Example of If Else Statement > Unix Shell Programming - counter
Sponsored Links


Popular Links


List of Abbreviations

National Highways in India

States & Union Territories of India

Currency of All Countries

Example of If Else Statement > Unix Shell Programming

You are Here: Home > Computer Subjects > Unix Shell Programming…

 

Example of If-Else Statement

Code:

clear

echo -n "Enter the Motorcycle name==> "
read b

if test $b = HONDA
then
	echo "The price of HONDA is Rs.56,000/-"
elif test $b = BAJAJ
then
	echo "The price of BAJAJ is Rs.44,000/-"
else
	echo $b "is not in the list."
fi

Output:

Enter the Motorcycle name==> HONDA

The price of HONDA is Rs.56,000/-

 

Click Here to Find Latest Jobs and Current Affairs

 

 

Updated: June 1, 2013 — 4:34 am
© 2016. All Rights Reserved. WikiIND.com