Running the bfin.sh
script will do little for you. It would change the value of the PATH
environment variable and then terminate. The changed variable is part of the script's environment, so it would be lost when the script ends.
The bash
shell will automatically source the file mentioned by the BASH_ENV
variable before running a script, so assuming that your script myscript
has a #!
-line referring to the bash
interpreter, the following would source the bfin.sh
script and then run your script with the modified environment:
BASH_ENV=path/to/bfin.sh ./myscript
You may also source the bfin.sh
script from within your new script:
#!/bin/bash
source path/to/bfin.sh
# the rest of the script goes here