Re: incorrect brace expansion

2006-01-29 Thread Chet Ramey
William Park wrote: >> side note, this also fails: >> $ echo {a}{b,c} >> {a}{b,c} >> -mike > > But, > echo {b,c}{x} > prints the correct result, > b{x} c{x} > > Well, gentlemen, we've found a bug. Anyone sending in a patch? I don't > use multiple braces that often, so it doesn't bother

Re: incorrect brace expansion

2006-01-29 Thread William Park
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

Re: incorrect brace expansion

2006-01-29 Thread Mike Frysinger
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. > > > > Exc

Re: incorrect brace expansion

2006-01-29 Thread William Park
On Sun, Jan 29, 2006 at 07:35:32PM -0500, Mike Frysinger wrote: > On Sunday 29 January 2006 19:23, William Park wrote: > > Let's see... > > a-{b{d,e}}-c > > a-{bd,be}-c > > i'm pretty sure the commas are consumed in the expansion > > side note, this also fails: > $ echo {a}{b,c} > {a}{b,c

Re: incorrect brace expansion

2006-01-29 Thread William Park
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

{-2..2}

2006-01-29 Thread William Park
Hi Chet, Bash-3.0 introduced {-2..2} syntax which generates -2, -1, 0, 1, 2. Unfortunately, it clashes with my extension which doesn't do negative integers; instead, mine was designed for "equal width" integer, like 00, 01, 02. Do you plan to keep the negative integer features of {a..b}? This is

Re: incorrect brace expansion

2006-01-29 Thread Mike Frysinger
On Sunday 29 January 2006 19:23, William Park wrote: > Let's see... > a-{b{d,e}}-c > a-{bd,be}-c i'm pretty sure the commas are consumed in the expansion side note, this also fails: $ echo {a}{b,c} {a}{b,c} -mike ___ Bug-bash mailing list Bug-

Re: incorrect brace expansion

2006-01-29 Thread Chris F.A. Johnson
On Sun, 29 Jan 2006, William Park wrote: On Sun, Jan 29, 2006 at 05:37:56PM -0500, Mike Frysinger wrote: On Sunday 29 January 2006 17:25, Bob Proulx wrote: The bash manual documents this as "Patterns to be brace expanded take the form of an optional PREAMBLE, followed by either a series of com

Re: incorrect brace expansion

2006-01-29 Thread William Park
On Sun, Jan 29, 2006 at 05:37:56PM -0500, Mike Frysinger wrote: > On Sunday 29 January 2006 17:25, Bob Proulx wrote: > > The bash manual documents this as "Patterns to be brace expanded > > take the form of an optional PREAMBLE, followed by either a series > > of comma-separated strings or a sequnc

Re: incorrect brace expansion

2006-01-29 Thread Mike Frysinger
On Sunday 29 January 2006 17:25, Bob Proulx wrote: > The bash manual documents this as "Patterns to be brace expanded take > the form of an optional PREAMBLE, followed by either a series of > comma-separated strings or a sequnce expression between a pair of > braces, followed by an optional POSTSCR

Re: incorrect brace expansion

2006-01-29 Thread Bob Proulx
Mike Frysinger wrote: > bash -c 'echo a-{b}-c' > a-{b}-c > > seems to me current behavior is inconsistent Yes. That is inconsistent with csh. csh -c 'echo a-{b}-c' a-b-c It is related to brace expansion but seems like a different case than the original poster's bug report. In the origina

Re: Output redirection?

2006-01-29 Thread Chet Ramey
Yuri Karlsbrun wrote: > Hello, > > I, probably, need bash-help mailing list, but I could not find it. > > Here is the bash script fragment: > LOG_FILE="./logfile" > ... >> $LOG_FILE > > I supposed that the statement above redirects stdout to the logfile. > But the following 'echo' statement prin

Re: Fwd: read -n is confused by \

2006-01-29 Thread Brett Kail
Hello, > This is fixed in 3.1, Looking at the release notes, I'm not sure how I missed this. Sorry for the noise. > Presumably, without -r, the backslash is not considered a > character, it is an escape mechanism. Ok. I just thought perhaps the docs could be clarified to mention t

Re: incorrect brace expansion

2006-01-29 Thread Bob Proulx
Tim Waugh wrote: > echo a-{b{d,e}}-c > > Should get: a-{bd}-c a-{be}-c > but actually get: a-bd-c a-be-c Hmm... But csh is the origin of the brace expansion feature. So shouldn't bash behave like csh? Which bash does do at this time. csh -c 'echo a-{b{d,e}}-c' a-bd-c a-b

Re: bash test builtin and test_eaccess() vs access()

2006-01-29 Thread Chet Ramey
Alan Sundell wrote: > bash's "test" builtin can report the wrong results in many > circumstances (e.g. read-only filesystems, noexec filesystems, ACLs, > NFS, AFS, setuid executables, etc) because it uses stat() rather than > access() for the unary -w, -r, -x, etc. > > Could the eaccess/euidaccess

Re: Output redirection?

2006-01-29 Thread Chris F.A. Johnson
On Fri, 27 Jan 2006, Yuri Karlsbrun wrote: Hello, I, probably, need bash-help mailing list, but I could not find it. The best place is the Usenet news group, comp.unix.shell. Here is the bash script fragment: LOG_FILE="./logfile" ... > $LOG_FILE That statement will create an empty

Re: Output redirection?

2006-01-29 Thread Bob Proulx
Yuri Karlsbrun wrote: > I, probably, need bash-help mailing list, but I could not find it. > > Here is the bash script fragment: > LOG_FILE="./logfile" > ... > >$LOG_FILE > > I supposed that the statement above redirects stdout to the logfile. > But the following 'echo' statement prints on the sc

Re: incorrect brace expansion

2006-01-29 Thread Mike Frysinger
On Saturday 28 January 2006 16:47, Bob Proulx wrote: > Tim Waugh wrote: > > echo a-{b{d,e}}-c > > > > Should get: a-{bd}-c a-{be}-c > > but actually get: a-bd-c a-be-c > > Hmm... But csh is the origin of the brace expansion feature. So > shouldn't bash behave like csh? Which bash doe