You are working for a company that offers driver licence training and you have been asked to write a script that asks your clients how old they are.
If he/she is 16 years old display the message "Please visit our company to take the test!"
If he/she is 15 years old display the message "Please take the training with us to learn how to drive!"
If he/she enters any other answer display the message. "Please visit out website to see our services!"
Name your script "if_statement.sh" and upload both the script listing and a screenshot of the output.
Be sure to include the standard header:
# Created by Your Name
# Assignment name
# Date
Do a screen capture of the code and the output. Submit as a single Word document
echo -n "Enter age:";
# read age
read age
#Write if else if accordingly
if [[ $age -eq 16 ]]
then
echo "Please visit our company to take the test!"
elif [[ $age -eq 15 ]]
then
echo "Please take the training with us to learn how to
drive!"
else
echo "Please visit out website to see our services!"
fi
comment if any doubts
Get Answers For Free
Most questions answered within 1 hours.