Skip to content

Commit e6fa259

Browse files
author
Ankam Ravi Kumar
authored
Create if-else-statement
if else statement. control statement example.
1 parent bd88401 commit e6fa259

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

if-else-statement

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
#Purpose: If else statement example
3+
#Version:1.0
4+
#Created Date: Sat May 12 23:49:15 IST 2018
5+
#Modified Date:
6+
#Website: https://arkit.co.in
7+
#Author: Ankam Ravi Kumar
8+
# START #
9+
echo -e "Enter any value> \c"
10+
read -r a
11+
echo -e "Enter any value: \c"
12+
read -r b
13+
14+
if [ $a -gt $b ]; then
15+
echo "$a is greater than $b"
16+
else
17+
echo "$b is greater than $a"
18+
fi
19+
# END #

0 commit comments

Comments
 (0)