Exercise: Operator [[

Put to practice what you have learned about operator [[.

We'll cover the following

Exercise

Write the Bash script with the following if condition:

  1. If the input parameter has a value of Alice, you print “Hello Alice”.

  2. If the input parameter has a value of Bob, you print “Hello Bob”.

  3. If none of the above cases hold, print “Hello John Doe”.

Make your file executable before running.

Get hands-on with 1400+ tech skills courses.