1855304 Members
2687 Online
104109 Solutions
New Discussion

case syntas

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

case syntas

in Bourne shell, which one is correct

1. case $a in
2. case in $a
3. case "$a" in
4. case "$a"
none
4 REPLIES 4
BFA6
Respected Contributor
Solution

Re: case syntas

Hi,

case $a in

is the corect one

Regards,

Hilary
Ian Lochray
Respected Contributor

Re: case syntas

According to HP's Shells:Users's guide, the correct answer is 1. case $a in
Seth Parker
Trusted Contributor

Re: case syntas

I got tired of looking for answers like this all the time so I printed the man pages. They generally give me a quick answer to my basic qustions. We use the POSIX shell so I did "man sh-posix | lp", but "man sh-bourne | lp" would give you what you're looking for.

I know it's not the actual answer to your question but it's a nice resouce since all the the basic syntax is in there.

Good luck!
Seth Parker
Trusted Contributor

Re: case syntas

I got tired of looking for answers like this all the time so I printed the man pages. They generally give me a quick answer to my basic qustions. We use the POSIX shell so I did "man sh-posix | lp", but "man sh-bourne | lp" would give you what you're looking for.

I know it's not the actual answer to your question but it's a nice resource since all the the basic syntax is in there.

Good luck!