Cyber Monday 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
2 months 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
2 months ago
C) date | actdat? Seriously, who writes these exam questions? That's not even a valid syntax!
upvoted 0 times
Lashunda
1 months ago
C) date | actdat? Seriously, who writes these exam questions? That's not even a valid syntax!
upvoted 0 times
...
Nobuko
1 months ago
B) set actdat='date'
upvoted 0 times
...
Verda
2 months ago
A) actdat=`date`
upvoted 0 times
...
...
Milly
2 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
2 months ago
D) date > $actdat? What is this, a redirection? I'm not falling for that trick!
upvoted 0 times
Doretha
26 days ago
E) Yes, that's correct. The backticks are used to capture the output of a command and assign it to a variable.
upvoted 0 times
...
Louis
1 months ago
A) Oh, I see. So the correct statement should be actdat=`date` then.
upvoted 0 times
...
Casie
1 months ago
D) No, that's not a redirection. It's assigning the output of the date command to the variable actdat.
upvoted 0 times
...
Iola
2 months ago
E) actdat=date
upvoted 0 times
...
Belen
2 months ago
D) date > $actdat
upvoted 0 times
...
Casandra
2 months ago
C) date | actdat
upvoted 0 times
...
Stephanie
2 months ago
B) set actdat='date'
upvoted 0 times
...
Gilma
2 months ago
A) actdat=`date`
upvoted 0 times
...
...
Ashley
2 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
2 months ago
I'm going with E) actdat=date. It's more readable and less likely to introduce errors.
upvoted 0 times
Leonora
2 months ago
I would go with A) actdat=`date` as well.
upvoted 0 times
...
Larae
2 months ago
I agree, A) actdat=`date` is the right choice.
upvoted 0 times
...
Walton
2 months ago
I think A) actdat=`date` is the correct statement.
upvoted 0 times
...
...
Glenn
2 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
3 months ago
I think the correct statement is A) actdat=`date`.
upvoted 0 times
...
Justine
3 months ago
A) looks good to me, it's the classic way to capture the output of the date command.
upvoted 0 times
Ardella
2 months ago
D) I think it should be date > $actdat to save the output of the date command.
upvoted 0 times
...
Lino
2 months ago
A) Oh, I see. Thanks for the clarification.
upvoted 0 times
...
Latonia
2 months ago
B) No, that's not the correct statement. It should be actdat=\`date\`.
upvoted 0 times
...
Howard
2 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
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77