LPIC-1 Exam 101 v5 (Linux Administrator) — Question 119

What output will be displayed when the user fred executes the following command? echo 'fred $USER'

Answer options

Correct answer: D

Explanation

The command echoes the string 'fred $USER', but since $USER is not expanded, it will display as is. Option D is correct because it shows the exact output of the command as intended. The other options either misinterpret the variable expansion or incorrectly format the output.