Linux Redhat lab: Shell script: The if-then-elif-fi Construct



Linux Redhat lab: Shell script: The if-then-elif-fi Construct

Linux Redhat lab: Shell script: The if-then-elif-fi Construct

Link playlist
https://www.youtube.com/playlist?list=PLIpLw6v7Z1qmty_yT3KQUeV5jW46Wu7hG
2023 07 07 16 32 35

Script10: The if-then-elif-fi Construct (Example 2)
The script ex200_ex294.sh will display the name of the Red Hat exam
RHCSA or RHCE in the output based on the input argument (ex200 or
ex294). If a random or no argument is provided, it will print “Usage:
Acceptable values are ex200 and ex294”. Make sure to add white spaces in
the conditions as shown.
Run this script three times: the first time with argument ex200, the second
time with argument ex294, and the third time with something random as an
argument:
The results are as expected.
EXAM TIP: A good understanding of the usage of logical statements is important