in reply to Re: Re: Re: Web-Safe Color Chart
in thread Web-Safe Color Chart
Yes, this is somewhat unexpected for most people, but it turns out that shells (bash and tcsh at least) always expand a list enclosed in curly braces regardless of the presence of actual files.
It is called Brace Expansion and it differs from Pathname Expansion in that file names need not exist (quoted from the bash manpage).
You can verify easily with:
$ ls {a,b,c} ls: a: No such file or directory ls: b: No such file or directory ls: c: No such file or directory $ ls [abc] ls: No match. $
The fact that files do not have to exist is to be regarded as a feature, not as a bug, because you can say at the shell prompt something like (by the way, you can nest):
$ mkdir -p {1999,2000,2001}/backup/{0{1,2,3,4,5,6,7,8,9},11,12}
And get 36 directories created with one command.
-- TMTOWTDI
|
|---|