mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-08-12 23:43:19 +00:00
Update while-loop.sh
This commit is contained in:
@ -1,8 +1,10 @@
|
|||||||
While Loop Example, print any given number table.
|
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## While Loop Example with 2 table
|
# While Loop Example with 2 table, print any given number table.
|
||||||
echo -e "Please provide one value:\c"
|
# See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit?sub_confirmation=1)
|
||||||
|
|
||||||
|
#START
|
||||||
|
|
||||||
|
echo -e "Please provide one value: \c"
|
||||||
read -r c
|
read -r c
|
||||||
i=1
|
i=1
|
||||||
while [ $i -le 10 ]
|
while [ $i -le 10 ]
|
||||||
@ -12,4 +14,4 @@ echo "$c * $i = $b"
|
|||||||
i=`expr $i + 1`
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
|
|
||||||
See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit?sub_confirmation=1)
|
#END
|
Reference in New Issue
Block a user