Skip to content

Commit 44928e2

Browse files
author
Ankam Ravi Kumar
authored
Create while loop
1 parent 2f3a277 commit 44928e2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

while loop

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
While Loop Example, print any given number table.
2+
3+
#!/bin/bash
4+
## While Loop Example with 2 table
5+
echo -e "Please provide one value:\c"
6+
read -r c
7+
i=1
8+
while [ $i -le 10 ]
9+
do
10+
b=`expr $c \* $i`
11+
echo "$c * $i = $b"
12+
i=`expr $i + 1`
13+
done
14+
15+
See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit?sub_confirmation=1)

0 commit comments

Comments
 (0)