To test a shell script called myscript, the environment variable FOOBAR must be removed
temporarily. How can this be done?
A.
unset -v FOOBAR
B.
set -a FOOBAR=””
C.
env -u FOOBAR myscript
D.
env -i FOOBAR myscript
To test a shell script called myscript, the environment variable FOOBAR must be removed
temporarily. How can this be done?
To test a shell script called myscript, the environment variable FOOBAR must be removed
temporarily. How can this be done?
A.
unset -v FOOBAR
B.
set -a FOOBAR=””
C.
env -u FOOBAR myscript
D.
env -i FOOBAR myscript
I think is A
It could be, i just tried that and it worked. However from the man pages about env
-u, –unset=NAME
remove variable from the environment
NO @dsp, definitely the answer A is incorrect
<> –> env -u is OK
unset -v FOOBAR –> it affects the entire shell and it is not temporary