Linux Foundation Certified System Administrator (LFCS) — Question 4

When the command echo $ outputs 1, which of the following statements is true?

Answer options

Correct answer: C

Explanation

The correct answer is C because the command echo $ outputs the exit status of the last command executed before echo, which in this case is 1. Options A and B are incorrect as they refer to process IDs, and option D is wrong because it pertains to the exit status of the echo command itself, not the preceding command.