I have some code I need replaced on +/- 10,000 files... (in various subdirectories, so replacement will need to be recursive)
Example of directory structure:
/usr/home/www/143/www/2003pics/day1
/usr/home/www/143/www/2003pics/day2
/usr/home/www/143/www/2003pics/day3
etc...
I would like to go to the 2003pics directory and run the script that will replace all the code on all the html files in that directory and als have it change the same code in the directories under it (day1, day2, etc).
Note: There are actually many sub-directories under different names.
## Deliverables
**what I have now (the old code):
**<a href='[login to view URL]' target='_blank'>
<img src=
'[login to view URL]:2&target=_blank&n=a538f097' border='0' alt=''></a>
**What I want to replace above with (the new code):**
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
[login to view URL] ("<" + "script language='JavaScript' type='text/javascript' src='");
[login to view URL] ("[login to view URL]");
[login to view URL] ("&what=zone:3");
[login to view URL] ("&exclude=" + document.phpAds_used);
if ([login to view URL])
[login to view URL] ("&referer=" + escape([login to view URL]));
[login to view URL] ("'><" + "/script>");
//-->
</script>
<noscript><a href='[login to view URL]' target='_blank'>
<img src='[login to view URL]:3&n=a7938262' border='0' alt=''></a></noscript>
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Basic directions on how to use program or script
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
## Platform
I have a FreeBSD server and can run shell commands (cshell), or even perl from the command line.