PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
unset -v FOOBAR

B.
set -a FOOBAR=""

C.
env -u FOOBAR myscript

D.
env -i FOOBAR myscript

Explanation:
From the man pages:
env – run a program in a modified environment
-u, –unset=NAME remove variable from the environment


Leave a Reply