bash expansion question

Jason Dufair
Wed Apr 12 19:29:00 GMT 2000

Hello -

I have cygwin b20 running on WinNT SP6

at the command line I get the following:

$ foo=bar/baz
$ echo ${foo%%/*}

However, if I have the following in a script:

echo ${foo%%/*}

and then run it, I get

It seems to be dropping one too many characters.  It seems I've either
found an expansion bug or I'm misunderstanding something.  Testing this
on my linux box (bash 1.14.7), it works as expected.  Can someone
clarify this for me?  Thanks a lot.

Jason Dufair - - PGP key on keyservers
"So many ways to understand
One for every woman and man
Been that way since the world began" - Bruce Cockburn

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list