I am creating a little automated setup script that will modify
$HOME/.profile if some paths are not exported. Then, I'd like to reload these automatically.
I have read that
source does this, so I fired up my terminal and entered:
source /etc/profile source ~/.profile
From the terminal, it didn't output any error.
However, putting these two commands inside the Bash script results in
source: not found.
- How can I be sure that the script is executed by Bash, even if
#!/bin/shis specified (apparently, it does not guarantee it)?
- Why would it say that these two sources cannot be found when they are unmistakably there?