utility
env -i
Start a command with an initially empty environment plus supplied assignments. Not a security sandbox.
Formal Syntax & Structure
bash syntaxbash
env -i NAME=value command [args ...]Return Value
exit status
Start a command with an initially empty environment plus supplied assignments. Not a security sandbox.
Working Example
Example Snippetbash
printf '%s\n' 'BM_LABEL=fixture' > startup.bashexport BASH_ENV="$PWD/startup.bash"env -i PATH=/usr/bin:/bin HOME="$PWD" LC_ALL=C /bin/bash --noprofile --norc -c 'printf "%s\n" "${BM_LABEL-unset}"'