numberWithSelect () { QUESTION=$1 read -ra OPTIONS <<< "$2" echo $QUESTION select ANSWER in ${OPTIONS[@]}; do if [ -n "$ANSWER" ]; then echo "Vous avec choisi $ANSWER" break else echo "Il n'y a pas de tel index!" fi done }