variable
BASH_ENV
Ordinary noninteractive Bash expands the value and executes the named file without searching PATH. Trust its contents and control inherited environment before launch.
Formal Syntax & Structure
bash syntaxbash
BASH_ENV=/absolute/file bash -c commandReturn Value
startup file path
Ordinary noninteractive Bash expands the value and executes the named file without searching PATH. Trust its contents and control inherited environment before launch.
Working Example
Example Snippetbash
printf '%s\n' 'export BM_LABEL=fixture' > startup.bashBASH_ENV="$PWD/startup.bash" bash --noprofile --norc -c 'printf "%s\n" "$BM_LABEL"'