here is the simple script that I have written in bash. In my script, I want the user input values to be in the upper case. As the values needed to be compared in upper case so I want the script to be written in such a way that in whichever case the user input i.e. upper or lower case, the values must be stored in upper case in the variable. My code be like:
favTeam="ENG" printf " --> (AUS) for Australia \n --> (BAN) for Bangladesh \n --> (NEP) for Nepal \n --> (IND) for India \n --> (ENG) for England\n " read -p "Please enter the code of your favourite country" code
if [ "$code" == "$favTeam" ] then
echo "The country you have choosen is England" else
echo "please try again next time"