PrintLogo

Archiving Files With Perl




Agatha had some complaints about her chicken cam. People weren't seeing enough chicken booty. A quick and easy way to do this is to use Perl:

while(6 ne 9){
for($c=1;$c<11;$c++){
system("scp root\@crackers:/chickenpicture.jpg /home/u-1/chickencam");
system("scp /home/u-1/chickencam/chickenpicture.jpg 
root\@signalq.com:/web/path/here/");
system("scp /home/u-1/chickencam/chickenpicture.jpg 
root\@signalq.com:/web/path/here/archive/chickenpicture".$c.".jpg");
sleep 300;
}
}

This way, the chicken cam cycles through. The only tricky part is escaping the @ symbols. You can see the results here.



This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art277.html

Copyright 1997-2007 NetAdminTools.com. Read our Terms of Use.