Hi all!

I am having a bit of difficulty with writing a script.  I am on Linux 8.0
and trying to run a case statement like a would in HP-UX.  This is not
working.  I looked up the man page on case and it indicated that it was
being obsoleted.  The man page suggested that I use switch.  When I attempt
to do so, I get a "command not found" error.  I am completely lost on what
to do next.

Here is the gist of my case statement a la HP-UX:

read reply
case $reply
    1)
    Do this
    ;;
    2)
    Do this
    ;;
    3)
    Do this
    ;;
    'x|X')
    Exit
    ;;
    *)
    echo error
    ;;
esac

Please help, I need to be able to read in a value from a menu and run a
corresponding script.


Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  [EMAIL PROTECTED]


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to