Linux Administration
medium

Questão de Linux Administration #019e3987

Enunciado da Questão
Linux Administration
#command substitution
#variable assignment
#date command
#shell expansion
Médio

Which of the following commands puts the output of the command date into the shell variable mydate?

A

mydate="$(date)"

Correta
B

mydate="exec date"

C

mydate="$((date))"

D

mydate="date"

E

mydate="${date}"

Explicação Oficial / Explicações da Comunidade

Command substitution using $(...) is the standard and recommended way to capture the output of a command into a variable.