mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-07-28 07:15:24 +00:00
16 lines
348 B
Bash
16 lines
348 B
Bash
While Loop Example, print any given number table.
|
|
|
|
#!/bin/bash
|
|
## While Loop Example with 2 table
|
|
echo -e "Please provide one value:\c"
|
|
read -r c
|
|
i=1
|
|
while [ $i -le 10 ]
|
|
do
|
|
b=`expr $c \* $i`
|
|
echo "$c * $i = $b"
|
|
i=`expr $i + 1`
|
|
done
|
|
|
|
See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit?sub_confirmation=1)
|