The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: case statement
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-12-2008
c00kie88 c00kie88 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 63
Red face case statement

Hi all,

I think i'm asking a sqtupid question here..

i'm using case sttament, what is the syntax or symbol for "or"?

I thought was ||

here a quick sample of my case statment

echo "Would you like to update your detail [Y/N]?"
read response
case $response in

"Y" || "y" )
echo "Please enter your new name
read name;;


"N" || "n")
echo "Bye bye"
exit;;

When i use above sytax, it complains "||" symbol

please help

Last edited by otheus; 10-12-2008 at 08:29 AM.. Reason: playfully Changing thread icon.