Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: From: "Christopher Jones" To: jase AT deadbeets DOT com, cygwin AT sourceware DOT cygnus DOT com Subject: RE: bash expansion question Date: Thu, 13 Apr 2000 09:38:05 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BFA54D.7FA0176A" X-Orig: ------_=_NextPart_001_01BFA54D.7FA0176A Content-Type: text/plain; charset="iso-8859-1" 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 AT deadbeets DOT com] > Sent: Wednesday, April 12, 2000 10:29 PM > To: cygwin AT sourceware DOT cygnus DOT 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 AT deadbeets DOT 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 AT sourceware DOT cygnus DOT com > ------_=_NextPart_001_01BFA54D.7FA0176A Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 AT deadbeets DOT com]=
> Sent: Wednesday, April 12, 2000 10:29 PM
> To: cygwin AT sourceware DOT cygnus DOT com
> Subject: bash expansion question
>
>
> Hello -
>
> I have cygwin b20 running on WinNT SP6
>
> at the command line I get the following:
>
> $ foo=3Dbar/baz
> $ echo ${foo%%/*}
> foo
>
> However, if I have the following in a = script:
>
> foo=3Dbar/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 AT deadbeets DOT 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 AT sourceware DOT cygnus DOT com
>

------_=_NextPart_001_01BFA54D.7FA0176A--