What output will be displayed when the user fred executes the following command?echo ‘fred $USER’
What output will be displayed when the user fred executes the following command?echo ‘fred $USER’
A . fred fred
B . fred /home/fred/
C . ‘fred $USER’
D . fred $USER
E . ‘fred fred’
Answer: D
Latest 101-500 Practice Questions with 242 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
NO. Completely wrong answer.
In single quotes, $USER is not expanded, so it is intepreted AS IS: fred $USER.
While in double quotes, $USER is intepreted as (environment) variable and expanded: fred fred.
Please, correct.