This is the mail archive of the cygwin@cygwin.com 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]

RE: bash-2.05b6 shell script fails


It appears to be a problem with command substitution.
The following script fails also:

#!/bin/bash
foo=foo1
# simple assignment worked?
bar=`echo`
# command-substitution worked?

When run in bash-2.05b6, the following results:

$ uname -r
1.3.14(0.62/3/2)

$ ./bug.sh
./bug.sh: line 5: command-substitution: command not found


> -----Original Message-----
> From: Dennis Cook [mailto:cook@sandgate.com]
> Sent: Wednesday, November 06, 2002 4:28 PM
> To: cygwin@cygwin.com
> Subject: bash-2.05b6 shell script fails
> 
> 
> The following bash script fails when run with bash-2.05b6.
> bash-2.05b5 is OK.
> 
> #!/bin/bash
> 
> # Make the DOS current directory string for "runbuild.bat" to use.
> export SRC_DIR=`cygpath -a -w .`
> 
> # Decide which platforms to build based on what kind of system we're
> # running on.
> case "`uname`" in
>     CYGWIN_NT-4.0)
> 	PLATFORMS=WinNT
> 	;;
>     CYGWIN_NT-5.0 | CYGWIN_NT-5.1)
> 	PLATFORMS="Win2K WinXP"
> 	;;
>     *)
> 	echo "Unknown OS type `uname`"
> 	exit
> 	;;
> esac
> --------------- end of bash script ----------
> 
> Errors are:
> ./run2.sh: line 5: unexpected EOF while looking for matching `''
> ./run2.sh: line 19: syntax error: unexpected end of file
> 
> -------------- end of errors ----------------------
> 
> The following variation also doesn't work:
> 
> #!/bin/bash
> 
> # Make the DOS current directory string for "runbuild.bat" to use.
> export SRC_DIR=`cygpath -a -w .`
> 
> # Decide which platforms to build based on what kind of system we are
> # running on.
> case "`uname`" in
>     CYGWIN_NT-4.0)
> 	PLATFORMS=WinNT
> 	;;
>     CYGWIN_NT-5.0 | CYGWIN_NT-5.1)
> 	PLATFORMS="Win2K WinXP"
> 	;;
>     *)
> 	echo "Unknown OS type `uname`"
> 	exit
> 	;;
> esac
> 
> ----------------- end of bash script -----------------
> 
> Errors are:
> 
> ./run3.sh: line 5: platforms: command not found
> 
>  
> Dennis T. Cook
> Member Technical Staff
> Sandgate Technologies, Inc.
> mailto:cook@sandgate.com
>  
> 
> 
> 
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]