mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-05-11 03:05:41 -04:00
16 lines
No EOL
217 B
Bash
Executable file
16 lines
No EOL
217 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# script to test while statement
|
|
|
|
if [ $# -eq 0 ] # note the spaces
|
|
then
|
|
echo "Error, missing argument!"
|
|
exit 1
|
|
fi
|
|
n=$1
|
|
i=1
|
|
while [ $i -le 10 ]
|
|
do
|
|
echo "$n * $i = `expr $i \* $n`"
|
|
i=`expr $i + 1`
|
|
done |