function username { echo username: read UN } while [ $UND -ne 1 ]; do username echo is $UN correct? select opt in $YN; do if [ "$opt" = "Yes" ]; then echo done let UND=1 elif [ "$opt" = "No" ]; then echo Please re-enter: let UND=0 else echo Bad option, Please retry. fi done done