Linux CLI - Environment and Configuration
What will be the output of the following commands?
MYVAR="hello" echo $MYVAR export MYVAR bash -c 'echo $MYVAR'
MYVAR="hello" echo $MYVAR export MYVAR bash -c 'echo $MYVAR'
bash -c 'echo $MYVAR' runs a new shell which inherits exported variables, so it prints "hello" again.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions