exam questions

Exam 101-500 All Questions

View all questions & answers for the 101-500 exam

Exam 101-500 topic 1 question 48 discussion

Actual exam question from LPI's 101-500
Question #: 48
Topic #: 1
[All 101-500 Questions]

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'
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
klever
Highly Voted 1 year, 9 months ago
single quotes will suppress the special meaning of $ sign and treat it literally outputting what literally is inside of the single quotes
upvoted 6 times
...
Ninymo
Most Recent 3 months, 3 weeks ago
Answer: D
upvoted 2 times
...
blk_542
1 year, 8 months ago
D supposed to be correct, but actually the question is wrongly written: `fred $USER' command would output a > prompt since it is mixing 2 quotation types. It supposed to be 'fred $USER' (single quotation type), this is easy to test and result are the same with a regular user and root.
upvoted 2 times
...
Cybersec1989
1 year, 9 months ago
Selected Answer: D
Correct Tested
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago