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]

cygwin-bash compat/regression bug... startup line prob

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 "", which had
> #!/bin/bash.
> But the error message says /usr/bin/bash.
  That's why I commented that something was bogus.  Here it is
law.Bliss> cat /tmp/
#!/bin/bash -u
echo -e "Hello World\n"

/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

Regarding how your script is executed:

If you do "$ bash", 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:
Unsubscribe info:

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