Question
In linux, how do you print out the exit/error code of the last command that was executed?

echo $? ^^ note that$ denotes variable expansion, and ? is special variable to represent exit code of last command/program executed in foreground.

Question
In linux, how do you print out the exit/error code of the last command that was executed?
?

Question
In linux, how do you print out the exit/error code of the last command that was executed?

echo $? ^^ note that$ denotes variable expansion, and ? is special variable to represent exit code of last command/program executed in foreground.

If you want to change selection, open document below and click on "Move attachment"

int: this is very useful for writing wrapper shell scripts that just add one argument.] $# Expands to the number of positional parameters in decimal (i.e. the number of command-line arguments). <span>$? Expands to the status of the most recently executed foreground pipeline. [I.e., the exit code of the last command.] \$- Expands to the current option flags as specified upon invocation,

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions