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

Re: OT: bash - pattern matching

On Wed, Dec 01, 2004 at 08:28:29AM +0100, Dieter Baurecht wrote:
> Pascal Volk schrieb:
> >~/blahblub$ ls -l {,.}foo*
> Toll! Kann mir bitte jemand {,.} in Worte übersetzten.

man bash

 Brace Expansion
       Brace expansion is a mechanism by which  arbitrary  strings
       may  be  generated.   This mechanism is similar to pathname
       expansion, but the  filenames  generated  need  not  exist.
       Patterns  to be brace expanded take the form of an optional
       preamble, followed by a series of  comma-separated  strings
       between   a   pair  of  braces,  followed  by  an  optional
       postscript.  The preamble is prefixed to each  string  con-
       tained  within  the  braces,  and  the  postscript  is then
       appended to each resulting string, expanding left to right.

       Brace  expansions  may  be  nested.   The  results  of each
       expanded string are not sorted; left to right order is pre-
       served.  For example, a{d,c,b}e expands into 'ade ace abe'.

       Brace expansion is performed before any  other  expansions,
       and  any  characters  special  to other expansions are pre-
       served 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.


Christian Knoke            * * *            http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.

Reply to: