QuestionQ119Verified/Shells y scriptsCopy linkReport a problemAsk AstroTutorSave questionWhich of the following commands stores the output of the date command in the shell variable mydate?Amydate="date"Bmydate="exec date"Cmydate="$((date))"Dmydate="$(date)"Emydate="${date}"Show AnswerAnswerExplanationCommand substitution, written as $(command), runs the enclosed command and expands to its standard output. Thus mydate="$(date)" assigns the output of date to mydate.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion