Linux Administration
medium

Questão de Linux Administration #019e3987

Enunciado da Questão
Linux Administration
#bash-variable-assignment
#variable-syntax
#shell-variables
#no-spaces-around-equals
Médio

Which of the following command sets the Bash variable named TEST with the content FOO?

A

set TEST="FOO"

B

TEST = "FOO"

C

var TEST="FOO"

D

TEST="FOO"

Correta

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

In Bash, the correct syntax to assign a value to a variable is VARIABLE_NAME=value with no spaces around the = sign. The command TEST="FOO" correctly sets the variable TEST to the string FOO.