Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Scripts to recursively reading in HTML files

by vladdrak (Monk)
on Sep 01, 2004 at 07:21 UTC ( [id://387417]=note: print w/replies, xml ) Need Help??


in reply to Scripts to recursively reading in HTML files

It's probably best to use an .htaccess like solution if you can. If you decide to do a find & replace, or are curious as to how this might be done for something else:

Unix
perl -pibak -e 's/src\=\"\'/src\=\'\.\.\//' `find /basepath -name *.ht +ml`
Windows
for /f %i in ('dir /s/b d:\basepath | findstr html$') do perl -pibak - +e 's/src\=\"\'/src\=\'\.\.\//' %i
This will perform substitution on all html files underneath the specified base directory, and make a backup file (ext bak) for each edited file. You'll probably want to season to taste, and practice on a backup a couple times.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://387417]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-20 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found