exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 129 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 129
Topic #: 1
[All LFCS Questions]

Which of the following commands puts the output of the command date into the shell variable mydate?

  • A. mydate="$(date)"
  • B. mydate="exec date"
  • C. mydate="$((date))"
  • D. mydate="date"
  • E. mydate="${date}"
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
9866666
5 months, 1 week ago
Selected Answer: A
root@CT101:~# echo $mydate Tue Jun 25 11:05:20 UTC 2024 root@CT101:~#
upvoted 1 times
9866666
5 months, 1 week ago
root@CT101:~# mydate="$(date)" root@CT101:~# echo $mydate Tue Jun 25 11:05:20 UTC 2024 root@CT101:~#
upvoted 1 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 ...