This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CASE error in script file


Hello,
I am using Cygwin  1.5.21(0.156/4/2).I try to run the shell script called test.sh

case $1 in
    1)
        echo '1'
        ;;
    2)
        echo '2'
        ;;
    *)
        echo 'Dunno'
        exit 1
esac

but i always get the following error

'/test.sh: line 1: syntax error near unexpected token `in
'/test.sh: line 1: `case $1 in

I can run the script successfully in a linux box.

Please help

Doug


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]