Valid 102-500 Dumps shared by ExamDiscuss.com for Helping Passing 102-500 Exam! ExamDiscuss.com now offer the newest 102-500 exam dumps, the ExamDiscuss.com 102-500 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 102-500 dumps with Test Engine here:
How can the existing environment variable FOOBAR be suppressed for the execution of the script./myscript only?
Correct Answer: C
The env command can be used to run a utility or command in a custom environment without having to modify the currently existing environment1. The -u or --unset option can be used to remove a variable from the environment12. Therefore, the command env -u FOOBAR./myscript will run the script./myscript in an environment where the variable FOOBAR is suppressed. The other options are incorrect for the following reasons: * A. unset -v FOOBAR;./myscript: This will unset the variable FOOBAR in the current shell, not just for the script execution. The semicolon (;) separates two commands, so the script will run in the same environment as the unset command. * B. set -a FOOBAR="";./myscript: This will set the variable FOOBAR to an empty string, not suppress it. The -a option means that the variable will be exported to the environment of subsequent commands, so the script will still see the variable FOOBAR, but with no value. * D. env -i FOOBAR./myscript: This will run the script in an empty environment, not just suppress the variable FOOBAR. The -i or --ignore-environment option means that no environment variables will be passed to the command12. References: env command in Linux with Examples - GeeksforGeeks, env - Wikipedia.