bash expansion question
Christopher Jones
cbjones@nortelnetworks.com
Thu Apr 13 08:45:00 GMT 2000
Title: RE: bash expansion question
Is your script calling /bin/sh?ÃÂ Is /bin/sh actually 'bash' or is it the default 'ash' shell?ÃÂ Using b20.1 I get 'bar' both times with script or command line.
Brian
> -----Original Message-----
> From: Jason Dufair [ mailto:jase@deadbeets.com ]
> Sent: Wednesday, April 12, 2000 10:29 PM
> To: cygwin@sourceware.cygnus.com
> Subject: bash expansion question
>
>
> Hello -
>
> I have cygwin b20 running on WinNT SP6
>
> at the command line I get the following:
>
> $ foo=bar/baz
> $ echo ${foo%%/*}
> foo
>
> However, if I have the following in a script:
>
> foo=bar/baz
> echo ${foo%%/*}
>
> and then run it, I get
> $ test.sh
> ba
>
> 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 - jase@deadbeets.com - 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 cygwin-unsubscribe@sourceware.cygnus.com
>
More information about the Cygwin
mailing list