Path to Startup File

If $BASH_ENV is defined when Bash executes a script, then it’s expanded and used as the name of Bash’s startup file.

Examples

Define a startup script :

1
2
3
echo 'echo startup' > startup.sh
echo 'echo script' > script.sh
BASH_ENV=./startup.sh bash ./script.sh

Output:

startup
script
BashSupport Pro is a Bash IDE with support for $BASH_ENV – try it now!
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal