🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Bash Scripting for DevOps: all 10 questions

Quiz: Bash Scripting for DevOps · Question 3 of 10

Which line correctly creates a variable in bash?

Which line correctly creates a variable in bash?

  1. A.name = "Asha"
  2. B.$name="Asha"
  3. C.name="Asha"
  4. D.set name "Asha"
Answer & explanation

Correct answer: name="Asha"

There must be no spaces around =, and there is no $ when assigning.

Can you get the rest right without peeking?

Take the timed Quiz: Bash Scripting for DevOps quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →