APL/APL1.2/SCR1.2/TP08/my_seq.sh

18 lines
192 B
Bash
Raw Normal View History

2021-11-16 15:32:33 +01:00
#!/bin/bash
if [[ $# -lt 1 ]]
2021-11-30 15:07:19 +01:00
then
echo "usage:my_seq.sh <integer>"
2021-11-16 15:32:33 +01:00
exit
fi
if [[ $1 -lt 0 ]]
then
2021-11-30 15:07:19 +01:00
echo "Argument must be positive !!"
2021-11-16 15:32:33 +01:00
exit
fi
for ((i=1;i<=$1;i++))
do echo $i
done
2021-11-30 15:07:19 +01:00
exit
2021-11-16 15:32:33 +01:00