[ale] making duplicate files
hbbs at attbi.com
hbbs at attbi.com
Tue May 20 14:03:40 EDT 2003
I am observing this with considerable interest...
What is the significance of the "%03d"?
- Jeff
>
> If you really want them to all have the same content no matter what:
>
>
> perl -e 'link("000.php",sprintf("%03d.php",$_))for 1..999'
>
>
> If you need them to be unique, individual files:
>
>
> perl -MFile::Copy=cp -e 'cp("000.php",sprintf("%03d.php",$_))for 1..999'
>
>
> Or there's always:
>
>
> zsh -c 'i=1;while ((i <= 999));do cp 000.php $(sprintf %03d.php $i);done'
>
>
> Or even one of:
>
>
> ruby -rftools -e '(1..999).each{|i|File.cp"000.php","%03d.php"%i}'
> ruby -e '(1..999).each{|i|File.link"000.php","%03d.php"%i}'
>
>
> --
> Fletch | "If you find my answers frightening, __`'/|
> fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
> 770 294-0820 (m) | scary questions." -- Jules =(___)=
> | U
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list