env
runs a command with a modified environment.
env [option]... [name=value]... [command [args]...]
If there is no name=value
or option following env
, what kind of environment is a command executed with?
What is the purpose of using env
without any name=value
or option following?
env bash -c 'echo "$_"'
Thanks.
env bash -c 'set'
?bash: set: No such file or directory
after runningenv bash -f 'set'
?set
display all the shell variables and functions. What is it to do with environment variables?