Skip to main content
added 10 characters in body
Source Link

Try,

 #!/bin/bash pause () { REPLY=Y while [ "$REPLY" == "Y" ] || [ "$REPLY" != "y" ] do echo -e "\t\tPress 'y' to continue\t\t\tPress 'n' to quit" read -n1 -s case "$REPLY" in "n") exit ;; "N") echo "case sensitive!!" ;; "y") clear ;; "Y") echo "case sensitive!!" ;; * ) echo "Invalid"$REPLY is Invalid Option" ;; esac done } pause echo "Hi" 

Try,

 #!/bin/bash pause () { REPLY=Y while [ "$REPLY" == "Y" ] || [ "$REPLY" != "y" ] do echo -e "\t\tPress 'y' to continue\t\t\tPress 'n' to quit" read -n1 -s case "$REPLY" in "n") exit ;; "N") echo "case sensitive!!" ;; "y") clear ;; "Y") echo "case sensitive!!" ;; * ) echo "Invalid Option" ;; esac done } pause echo "Hi" 

Try,

 #!/bin/bash pause () { REPLY=Y while [ "$REPLY" == "Y" ] || [ "$REPLY" != "y" ] do echo -e "\t\tPress 'y' to continue\t\t\tPress 'n' to quit" read -n1 -s case "$REPLY" in "n") exit ;; "N") echo "case sensitive!!" ;; "y") clear ;; "Y") echo "case sensitive!!" ;; * ) echo "$REPLY is Invalid Option" ;; esac done } pause echo "Hi" 
Source Link

Try,

 #!/bin/bash pause () { REPLY=Y while [ "$REPLY" == "Y" ] || [ "$REPLY" != "y" ] do echo -e "\t\tPress 'y' to continue\t\t\tPress 'n' to quit" read -n1 -s case "$REPLY" in "n") exit ;; "N") echo "case sensitive!!" ;; "y") clear ;; "Y") echo "case sensitive!!" ;; * ) echo "Invalid Option" ;; esac done } pause echo "Hi"