What will be the output of the following command? echo $(date %M) > date.txt
A.
The current time (Month) will be written in the date.txt file.
B.
It will create a variable $(date %M).
C.
It will print a string "date %M".
D.
The current time (Minutes) will be written in the date.txt file.
The Answer Is:
D
This question includes an explanation.
Explanation:
The date command with the %M specifier prints the current time (Minutes). Since the output is redirected towards the date.txt file, the current time (Minutes) will be printed in the date.txt file.
GSNA PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"