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 -->
  #1 (permalink)  
Old 09-11-2007
bkan77 bkan77 is offline
Registered User
 

Join Date: Jul 2007
Posts: 53
case statement

hi all
i'm writing a script and in it i need to prompt the user if the entered value is correct or not ,i wrote the following and its not working ,its executing the script even if i enter Y/N

pls any help is appreciated

echo "\nAre you sure you entered the right Destination Environment? y[n] : \c \n"
read ans
case ${ans} in
y/Y)
*);;
esac
Reply With Quote
Remove advertisements
!!
Forum Sponsor