Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blackfields

macrumors newbie
Original poster
Oct 12, 2019
1
0
Hi,

In Mojave I ran simple bash scripts by just writing them in text and saving as script.sh and then running from terminal.
In principle the same scripts do work in zsh in Catalina. But now in Catalina the same scripts often cause errors by not loading dyld libraries.
I can fix the error by adding "source ~/.zshrc" in front to load all the dyld libraries etc.

My question is that why in bash this is done without me needing to run "source ~/.bashrc" in front of the script?

I mean .zshrc or .zprofile is loaded automatically for all the terminal windows in mac. All good. But how can i get that loaded also when i run a "script.sh" from terminal window? It did work in bash for Mojave so i'm pretty sure it should be doable in Catalina too.

(All this work to avoid writing one line "source ~/.zshrc" in the script but im lazy :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.