![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Re: Re: Web-Safe Color Chartby trantor (Chaplain) |
on Oct 05, 2001 at 14:56 UTC ( #116959=note: print w/replies, xml ) | Need Help?? |
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:
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
In Section
Seekers of Perl Wisdom
|
|