[ale] making duplicate files

Fletch fletch at phydeaux.org
Tue May 20 13:59:26 EDT 2003



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





More information about the Ale mailing list