I need to check if $1 is A or B
I tried the following but it seems its not correct..would appreciate a suggestion ?
case "$1"
in
"A" || "B" )
;;
esac
Thanks
I need to check if $1 is A or B
I tried the following but it seems its not correct..would appreciate a suggestion ?
case "$1"
in
"A" || "B" )
;;
esac
Thanks
case $1 in
"A")
"B") #do something...
;;
*) #do something else
;;
esac
Yes That's possible but I prefer to find out if i can use an or statement
case "$1" in
A|B) echo "A or B";;
esac
thanks !!! it works the way i want it to now...