Files
SCR/SCR1.2/TP08/my_seq.sh~

13 lines
225 B
Bash
Raw Normal View History

2024-09-10 15:13:11 +02:00
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