-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path17_conditional_statement.sh
More file actions
54 lines (45 loc) · 1.01 KB
/
17_conditional_statement.sh
File metadata and controls
54 lines (45 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
read -p "Enter any a number : " marks
if [ $marks -gt 40 ];
then
echo "You are Pass"
else
echo "you are fail"
fi
read -p "Enter any a number : " marks
if [ $marks -eq 100 ];
then
echo "you are best"
fi
read -p "Enter any a number : " marks
if [ $marks -ge 50 ]
then
echo "mark is greater then or equal to 50"
fi
read -p "enter less then or equal to 50 : " marks
if [ $marks -le 50 ];
then
echo "great thank you : ) "
else
echo "you are supposed to Enter less then or equal 50 any number"
fi
read -p "Enter 10 please: " marks
if [ $marks -ne 10 ]; then
echo "You are supposed to enter 10"
else
echo "Thank you : )"
fi
read -p "Enter the value greater then 100 : " number
if [ $number -gt 100 ];
then
echo "thank you : ) "
else
echo "you are supposed to enter number which greater then 100"
fi
read -p "Enter the number which is lesser then 1000 : " mark
if [ $mark -lt 1000 ];
then
echo "wow you are right ; ) "
else
echo "you are supposed to enter less then 1000"
fi