Linux Essentials (010-160) — Question 63
Which of the following commands sets the variable USERNAME to the value bob?
Answer options
- A. set USERNAME bob
- B. $USERNAME==bob
- C. var USERNAME=bob
- D. USERNAME<=bob
- E. USERNAME=bob
Correct answer: E
Explanation
The command USERNAME=bob correctly assigns the value bob to the variable USERNAME in shell scripting. The other options either use incorrect syntax or commands that do not perform variable assignment.