» Linux »
Examen sur Linux »
Examen 201 : Advanced Administration »
Section 3 »
Question 3/20
Explanation: The variable "$?" checks the exit status of the last command run. The -eq "0" statement is used to
check whether a condition is true. The statement if [ "$?" -eq "0" ]; then... will check that the last command
executed correctly and run the next part of the script.
Reference: http://www.bolthole.com/solaris/ksh-basics.html
Incorrect Answers
A: The variable is "$?" not "$#".
C: The variable is "$?" not "$#".
D: The variable is "$?" not '$?' (double quotes, not single quotes).
E: The variable is "$?" not $@.