[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Brace expansion bug

From: Andreas Schwab
Subject: Re: Brace expansion bug
Date: Mon, 26 Mar 2012 13:44:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

Dan Douglas <address@hidden> writes:

> Hi, hopefully a self-explanatory one today:
>     ~ $ ( set -x -- {a..c}; echo "${*-"{1..3}"}" )
>     + echo 'a b c' 'a b c' 'a b c'
>     a b c a b c a b c
>     ~ $ ( set -x -- {a..c}; echo "${*/"{1..3}"/$*}" )
>     + echo 'a b c' 'a b c' 'a b c'
>     a b c a b c a b c

*Note (bash) Brace Expansion::

   Brace expansion is performed before any other expansions, and any
characters special to other expansions are preserved in the result.  It
is strictly textual.  Bash does not apply any syntactic interpretation
to the context of the expansion or the text between the braces.  To
avoid conflicts with parameter expansion, the string `${' is not
considered eligible for brace expansion.


Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]