Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a701b07

Browse files
author
Ankam Ravi Kumar
authored
Create if-elif-if.sh
1 parent a4cb197 commit a701b07

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

if-elif-if.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
#Purpose: Find biggest Number among 4 digits
3+
#Version:1.0
4+
#Created Date: Wed May 16 18:45:58 IST 2018
5+
#Modified Date:
6+
#Author: Ankam Ravi Kumar
7+
# START #
8+
echo -e "Please Enter a Value: \c"
9+
read -r a
10+
echo -e "Please Enter b Value: \c"
11+
read -r b
12+
echo -e "Please Enter c Value: \c"
13+
read -r c
14+
echo -e "Please Enter d Value: \c"
15+
read -r d
16+
17+
if [ $a -gt $b -a $a -gt $c -a $a -gt $d ]; then
18+
echo "$a a is big"
19+
elif [ $b -gt $c -a $b -gt $d ]; then
20+
echo "$b b is big"
21+
elif [ $c -gt $d ]; then
22+
echo "$c c is big"
23+
else
24+
echo "$d d is big"
25+
fi
26+
27+
# END #

0 commit comments

Comments
 (0)