Tatavarty Kalyan schrieb am 08.09.2006 um 11:44:47 (+0800):
It is because the string
a{b,c}
is outside of the quotes. So the brace expansion comes first and
duplicates
the arguments to the echo call.
Yes, as you said the brace expansion is outside the double quotes so
shouldn't it
Chris F.A. Johnson wrote:
Quote them, and they do expand:
$ foo() { echo ${1:-a{b,c}} ; }
$ foo
ab ac
Brace expansion is essentially separate from the rest of the expansions:
in fact, it's designed to be part of a separate library if desired. As
such, it doesn't implement all of the
Tatavarty Kalyan schrieb am 07.09.2006 um 14:20:43 (+0800):
On 9/6/06, Chris F.A. Johnson [EMAIL PROTECTED] wrote:
On 2006-09-06, Andreas Schwab wrote:
[EMAIL PROTECTED] (Paul Jarc) writes:
Mike Frysinger [EMAIL PROTECTED] wrote:
this little bit of code doesnt work right:
foo() {
On 9/8/06, Alexander Elgert [EMAIL PROTECTED] wrote:
Tatavarty Kalyan schrieb am 07.09.2006 um 14:20:43 (+0800):
On 9/6/06, Chris F.A. Johnson [EMAIL PROTECTED] wrote:
On 2006-09-06, Andreas Schwab wrote:
[EMAIL PROTECTED] (Paul Jarc) writes:
Mike Frysinger [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] (Paul Jarc) writes:
Mike Frysinger [EMAIL PROTECTED] wrote:
this little bit of code doesnt work right:
foo() { echo ${1:-a{b,c}} ; }
Brace expansion happens before parameter expansion (man bash,
EXPANSION).
Brace expansion doesn't come into play here, because the braces
On Wednesday 06 September 2006 05:04, Andreas Schwab wrote:
[EMAIL PROTECTED] (Paul Jarc) writes:
Mike Frysinger [EMAIL PROTECTED] wrote:
this little bit of code doesnt work right:
foo() { echo ${1:-a{b,c}} ; }
Brace expansion happens before parameter expansion (man bash,
EXPANSION).
On 2006-09-06, Andreas Schwab wrote:
[EMAIL PROTECTED] (Paul Jarc) writes:
Mike Frysinger [EMAIL PROTECTED] wrote:
this little bit of code doesnt work right:
foo() { echo ${1:-a{b,c}} ; }
The first '}' is interpreted as the end of the parameter expansion.
Brace expansion happens before
Mike Frysinger [EMAIL PROTECTED] wrote:
this little bit of code doesnt work right:
foo() { echo ${1:-a{b,c}} ; }
Brace expansion happens before parameter expansion (man bash,
EXPANSION). So the first } ends the parameter expression, and the
second } isn't special. The result of parameter
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 original
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 POSTSCRIPT.
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 sequnce
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
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
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, {d,e} gets
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
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 me. :-)
Don't
16 matches
Mail list logo