sugt, dit wil ik ook overal
This commit is contained in:
parent
e78a149ecb
commit
eefa1b923e
1 changed files with 21 additions and 0 deletions
21
range/range
Executable file
21
range/range
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
# range - Generate of numbers.
|
||||
|
||||
lo=$1
|
||||
hi=$2
|
||||
|
||||
if [ $lo -le $hi ]; then
|
||||
# echo blaat
|
||||
while [ $lo -le $hi ]
|
||||
do
|
||||
echo -n $lo " "
|
||||
lo=`expr $lo + 1`
|
||||
done
|
||||
else
|
||||
while [ $hi -le $lo ]
|
||||
do
|
||||
echo -n $lo " "
|
||||
lo=`expr $lo - 1`
|
||||
done
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue