BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam LFCS Topic 7 Question 85 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 85
Topic #: 7
[All LFCS Questions]

The output of the program date should be saved in the variable actdat. What is the correct statement?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Tula
26 days ago
A) is the way to go. Unless, of course, you're a time traveler and want to save the future date. Then D) might work.
upvoted 0 times
...
Luis
30 days ago
C) date | actdat? Seriously, who writes these exam questions? That's not even a valid syntax!
upvoted 0 times
Nobuko
4 days ago
B) set actdat='date'
upvoted 0 times
...
Verda
15 days ago
A) actdat=`date`
upvoted 0 times
...
...
Milly
1 months ago
B) set actdat='date'? Are you kidding me? That's not how you assign the output of a command!
upvoted 0 times
...
Gussie
1 months ago
D) date > $actdat? What is this, a redirection? I'm not falling for that trick!
upvoted 0 times
Iola
12 days ago
E) actdat=date
upvoted 0 times
...
Belen
14 days ago
D) date > $actdat
upvoted 0 times
...
Casandra
16 days ago
C) date | actdat
upvoted 0 times
...
Stephanie
23 days ago
B) set actdat='date'
upvoted 0 times
...
Gilma
25 days ago
A) actdat=`date`
upvoted 0 times
...
...
Ashley
1 months ago
I'm not sure, but I think D) date > $actdat could also work if we want to redirect the output of the date command to the variable actdat.
upvoted 0 times
...
Lynsey
1 months ago
I'm going with E) actdat=date. It's more readable and less likely to introduce errors.
upvoted 0 times
Leonora
14 days ago
I would go with A) actdat=`date` as well.
upvoted 0 times
...
Larae
15 days ago
I agree, A) actdat=`date` is the right choice.
upvoted 0 times
...
Walton
20 days ago
I think A) actdat=`date` is the correct statement.
upvoted 0 times
...
...
Glenn
1 months ago
I agree with Estrella, A) actdat=`date` makes sense because it assigns the output of the date command to the variable actdat.
upvoted 0 times
...
Estrella
2 months ago
I think the correct statement is A) actdat=`date`.
upvoted 0 times
...
Justine
2 months ago
A) looks good to me, it's the classic way to capture the output of the date command.
upvoted 0 times
Ardella
28 days ago
D) I think it should be date > $actdat to save the output of the date command.
upvoted 0 times
...
Lino
1 months ago
A) Oh, I see. Thanks for the clarification.
upvoted 0 times
...
Latonia
1 months ago
B) No, that's not the correct statement. It should be actdat=\`date\`.
upvoted 0 times
...
Howard
1 months ago
A) looks good to me, it's the classic way to capture the output of the date command.
upvoted 0 times
...
...

Save Cancel