This is the mail archive of the
cygwin
mailing list for the Cygwin project.
cygwin-bash compat/regression bug... startup line prob
- From: Linda Walsh <cygwin at tlinx dot org>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 01 May 2014 15:11:44 -0700
- Subject: cygwin-bash compat/regression bug... startup line prob
- Authentication-results: sourceware.org; auth=none
Bob McGowan wrote:
>> Because you weren't running /bin/bash at that point in time, but
>> /usr/bin/bash. Again, you snipped the relevant portion of your original
> ----
> No...I was... the output at the top was from "t.sh", which had
> #!/bin/bash.
>
> But the error message says /usr/bin/bash.
----
That's why I commented that something was bogus. Here it is
again:
law.Bliss> cat /tmp/t.sh
#!/bin/bash -u
echo -e "Hello World\n"
law.Bliss> t.sh
/usr/bin/bash: - : invalid option
Usage: /usr/bin/bash [GNU long option] [option] ...
/usr/bin/bash [GNU long option] [option] script-file ...
GNU long options:
----
The reason the above fails... (I got it to work).. is that if there is a space
on the line after the "-u", that also fails.
I didn't deliberately put one there, but that it no longer handles
separate options is an evolution of software devolution.
But NOTE -- the above error claims it is coming from /usr/bin/bash.
That's not my login shell nor on the shebang line.
That's cygwin-black-magic... converting all /bin paths to /usr/bin...even
shells?...
Regarding how your script is executed:
If you do "$ bash t.sh", the she-bang line is *ignored*, it's just a
comment in this case.
---
I'm aware of that -- I was noting that the alternate ways of invoking it
made a difference. Not that I didn't understand why.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple