The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: case statement
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 09-11-2007
porter porter is offline
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by bkan77 View Post
Sir according to the script if the user enters either N/n then the script must ask him to enter a valid number,instead here its gng to the nxt step and executuing it

thnks
Not according to the script you posted....

Code:
echo "\nAre you sure you entered the right Destination Environment? y[n] : \c \n"
read ans
case ${ans} in
y/Y)
*);;
esac
Nothing about case "N", nothing about "valid number". Your case statement is just plain wrong.
Reply With Quote