if [ $# -eq 0 ]; then echo "Usage: $0 " 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