mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-05-11 11:15:13 -04:00
15 lines
No EOL
313 B
Bash
Executable file
15 lines
No EOL
313 B
Bash
Executable file
#! /bin/bash
|
|
# script to test for loop and arguments
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
echo "Error - Number missing form command line argument"
|
|
echo "Syntax : $0 number"
|
|
echo "Use to print multiplication table for given number"
|
|
exit 1
|
|
fi
|
|
n=$1
|
|
for i in 1 2 3 4 5 6 7 8 9 10
|
|
do
|
|
echo "$n * $i = `expr $i \* $n`"
|
|
done |