subroutine error for Cygwin bash 3.2.9(11)-release

Jim Guojun j_guojun@lbl.gov
Fri Feb 9 05:56:00 GMT 2007


Install the latest Cygwin to A number XP machines with the same 
installation procedure, but
some machines work fine and some did not. The shell does not like the 
subrutine in a script file (See below).
Even the error output is strange -- s is replaced by a <'>. There is no 
' symbol in the script anywhere, so
I do not know what the bash complaint about.

Has anyone seen the same problem?

bash-3.2$ sh -x start.sh
+ $'\r'
: command not found
'tart.sh: line 6: syntax error near unexpected token `
'tart.sh: line 6: `func()

bash-3.2$ sh -version
GNU bash, version 3.2.9(11)-release (i686-pc-cygwin)
Copyright (C) 2005 Free Software Foundation, Inc.


bash-3.2$ less start.sh

#!/bin/sh

if [ x$1 = x2 ]; then
fi

func()
{
        echo "cannot process subroutine"
}

if [ ...] # everything is ok as long as no subroutines

--
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/



More information about the Cygwin mailing list