<tt>{</tt>,<tt>}</tt>: Alternatives (except Korn Shell)



next up previous contents
Next: : Escape Up: Metacharacters (Wildcards) Previous: : Any Single

{,}: Alternatives (except Korn Shell)

Consider a directory with most files beginning with fil. Two of those files are filling, and filler. An easy way to erase those files is to use:

rm fil{ler,ling}

This is equivalent to issuing:

rm filler
rm filling

The shell first interprets the command with the first entry within brackets, then with the second (then third, fourth...).



Super-User
Fri Feb 17 15:55:40 EST 1995