Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Copy the script and run it on your system and give a detail comment of what each line is doing. - - - - -

Copy the script and run it on your system and give a detail comment of what each line is doing.
------------------------------------------------
#!/bin/bash
# Scriptname: tellage
#
read -p"How old are you? "
age=$REPLY
if (( age <0|| age >120))
then
echo "You are not a real person! "
exit 1
fi
if (( age >=0 && age <13))
then
echo "You still have some of the best years of your life ahead."
elif (( age >12 && age <20))
then
echo "Important years to learn"
elif (( age >=20 && age <30))
then
echo "Time to find a potential mate!!"
elif (( age >=30 && age <40))
then
echo "You are probably changing diapers"
else
echo "Sorry I asked"
fi
-----------------------------------------

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions