Create if-elif-if.sh

This commit is contained in:
Ankam Ravi Kumar
2018-05-17 23:08:35 +05:30
committed by GitHub
parent a4cb197585
commit a701b076dc

27
if-elif-if.sh Normal file
View File

@ -0,0 +1,27 @@
#!/bin/bash
#Purpose: Find biggest Number among 4 digits
#Version:1.0
#Created Date: Wed May 16 18:45:58 IST 2018
#Modified Date:
#Author: Ankam Ravi Kumar
# START #
echo -e "Please Enter a Value: \c"
read -r a
echo -e "Please Enter b Value: \c"
read -r b
echo -e "Please Enter c Value: \c"
read -r c
echo -e "Please Enter d Value: \c"
read -r d
if [ $a -gt $b -a $a -gt $c -a $a -gt $d ]; then
echo "$a a is big"
elif [ $b -gt $c -a $b -gt $d ]; then
echo "$b b is big"
elif [ $c -gt $d ]; then
echo "$c c is big"
else
echo "$d d is big"
fi
# END #