I have a shell script that will ask for username and it will check against a list.if the name is inside the list, it will run another shell script but if the name cannot be found, it will prompt a error message and exit the shell script.But i would like to allow 3 retries before exiting the shell script.Below is my shell script#!/bin/bashname=$(whiptail --title Title \--backtitle Backtitle \--inputbox Enter your User ID 0 40 3>&1 1>&2 2>&3)if [[ -z $name ]]then    whiptail --title Error --msgbox Please enter User ID to proceed 10 50    . ./start.shelse    egrep  -i \<$name\> ./user.list    case $? in        0)        . ./main_menu.sh        ;;        1)        whiptail --title Error --msgbox Program terminated. You are not authorised to use this program 10 50            ;;        esacfi
How to allow a bash shell script to loop for 3 retries before exiting (prompt for username/password)
bash;shell script