Lpi Linux Essentials 010 160 · Free Practice Question Easy
Question 12
To determine if the last command run on a system was successful, which command should be executed?
- A echo $?
- B echo $#
- C exit $
- D echo $0
Reveal correct answer
Correct answer: A
Explanation
OBJ-3.3: The command "echo $?" will display the exit code of the last command executed from the shell. If the result is 0, then the last command was successfully run without any errors.Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
