Why is the output of $PATH different when in a script vs when running $PATH from the terminal? Even for a minimal script like this:
#!/bin/bash echo $PATH
it will not match what I get when typing in $PATH in the terminal. Because of this, I keep getting "command not found". How can I fix this? I'm using OSX High Sierra.
Ok, "export PATH" seems to have solved part of my problem. One of the programs that I am using though is dynamically linked. For some reason, even with export path it says "dyld: Library not loaded". At least now the program is in the path when called from the script. What does "export PATH" do? And how can I include the library paths as well?