This is the mail archive of the cygwin@sourceware.cygnus.com 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]

Re: bash expansion question


Many thanks, Larry.  Indeed sh was != bash.  I renamed sh.exe and linked
sh to bash and voila!

Now, I suppose there's a good reason that cygwin was set up this way out
of the box.  If anyone could enlighten me with that reasoning, I'll be
able to rest easily then.  I am not intending to criticize, just to
learn a bit more.

Thank you.

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 10:56 AM 4/13/00, Jason Dufair wrote:
> >"Larry Hall (RFK Partners Inc)" wrote:
> > >
> > > At 09:28 PM 4/12/00 -0500, you wrote:
> > > >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.
> > > >
> > >
> > > Sounds like a text/binary thing to me.  Try setting adding "binmode" to
> > > your CYGWIN environment variable and restarting bash...
> >
> >Thanks for the suggestion, Larry.  I tried it and it seems to have had
> >no effect.  Can anyone duplicate this by chance?
> 
> No, I can't.  Are you sure you're running the same shell in both cases
> (i.e. is sh = bash and is bash what you're running)?
> 
> Larry Hall                              lhall@rfk.com
> RFK Partners, Inc.                      http://www.rfk.com
> 118 Washington Street                   (508) 893-9779 - RFK Office
> Holliston, MA 01746                     (508) 893-9889 - FAX
>                                         (508) 560-1285 - cell phone

-- 
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


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