[ale] making duplicate files

Dylan Northrup docx at io.com
Tue May 20 12:37:56 EDT 2003


A long time ago, (20.05.03), in a galaxy far, far away, ChangingLINKS.com wrote:

:=Where there is Linux, there is a way, right?
:=I have a file called 000.php and I want to 998 create files 
:=*that have the same content* named 001.php - 999.php.
:=
:=How would I do that from the command line?

This should work if you've got perl installed (and if you don't have perl
installed, what kind of Linux box are you running, anyway!?!?!?! :-)

perl -e '$i=1;while($i<1000){$j=sprintf "%03d",$i++;`ln 000.php $j.php`;}'

-- 
Dylan Northrup <*> docx at io.com <*> http://www.io.com/~docx/
"Harder to work, harder to strive, hard to be glad to be alive, but it's 
 really worth it if you give it a try." -- Cowboy Mouth, 'Easy'

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list