* bash-2.05b6 shell script fails
@ 2002-11-06 13:27 Dennis Cook
0 siblings, 0 replies; 3+ messages in thread
From: Dennis Cook @ 2002-11-06 13:27 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bash-2.05b6 shell script fails
2002-11-06 14:02 Harig, Mark A.
@ 2002-11-06 22:51 ` Corinna Vinschen
0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2002-11-06 22:51 UTC (permalink / raw)
To: cygwin
On Wed, Nov 06, 2002 at 05:02:12PM -0500, Harig, Mark A. wrote:
> 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
I just figured that it's a line ending problem. It turned out that I
reintroduced the -4 bug mistakenly. I'm going to uploaded a -7 version.
Thanks for the report,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: bash-2.05b6 shell script fails
@ 2002-11-06 14:02 Harig, Mark A.
2002-11-06 22:51 ` Corinna Vinschen
0 siblings, 1 reply; 3+ messages in thread
From: Harig, Mark A. @ 2002-11-06 14:02 UTC (permalink / raw)
To: Dennis Cook, cygwin
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-07 6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06 13:27 bash-2.05b6 shell script fails Dennis Cook
2002-11-06 14:02 Harig, Mark A.
2002-11-06 22:51 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).