QuestionQ119

VerifiedShells y scripts

Which of the following commands stores the output of the date command in the shell variable mydate?

Explanation

Command substitution, written as $(command), runs the enclosed command and expands to its standard output. Thus mydate="$(date)" assigns the output of date to mydate.

Community Discussion

No comments yet. Be the first to start the discussion!