LPI
102-400 · Question #82
Which of the following commands puts the output of the command date into the shell variable mydate?
The correct answer is A. mydate="$(date)". See the full explanation below for the reasoning.
Question
Which of the following commands puts the output of the command date into the shell variable mydate?
Options
- Amydate="$(date)"
- Bmydate="exec date"
- Cmydate="$((date))"
- Dmydate="date"
- Emydate="${date}"
How the community answered
(43 responses)- A79% (34)
- B7% (3)
- C2% (1)
- D9% (4)
- E2% (1)
Community Discussion
No community discussion yet for this question.