scr
This commit is contained in:
12
SCR1.2/TP08/my_seq.sh~
Executable file
12
SCR1.2/TP08/my_seq.sh~
Executable file
@@ -0,0 +1,12 @@
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <nombre>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [[ $1 =~ ^[1-9][0-9]*$ ]]; then
|
||||
echo "Erreur : L'argument doit être un entier positif."
|
||||
exit 1
|
||||
fi
|
||||
for ((i=1; i<=$1; i++)); do
|
||||
echo $i
|
||||
done
|
||||
Reference in New Issue
Block a user