gnu.bash.bug
[Top] [All Lists]

Re: incorrect brace expansion

Subject: Re: incorrect brace expansion
From: William Park
Date: Sun, 29 Jan 2006 20:35:54 -0500
Newsgroups: gnu.bash.bug
On Sun, Jan 29, 2006 at 08:16:40PM -0500, Mike Frysinger wrote:
> On Sunday 29 January 2006 20:08, William Park wrote:
> > On Sun, Jan 29, 2006 at 07:33:14PM -0500, Chris F.A. Johnson wrote:
> > > On Sun, 29 Jan 2006, William Park wrote:
> > > >Let's see...
> > > >   a-{b{d,e}}-c
> > > >   a-{bd,be}-c
> > > >   a-bd-c a-be-c
> > > >
> > > >It looks okey, I think.
> > >
> > >     Except that b{d,e} expands to 'bd be', not 'bd,be'.
> >
> > Hmm... no.  Internally,
> 
> arguing for what goes on internally shouldnt have bearing on what the
> user result is ... and in this case, the user result would be as Chris
> says imho -mike

b{d,e} gives you 2 strings.  You can put any separator you want between
'bd' and 'be' when printing them out.  If IFS='x', then should the
answer be
    a-{bdxbe}-c
?

-- 
William Park <opengeometry@xxxxxxxx>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
           http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
          http://freshmeat.net/projects/bashdiff/



<Prev in Thread] Current Thread [Next in Thread>