[kwlug-disc] Block level search and replace

Insurance Squared Inc. gcooke at insurancesquared.com
Wed Feb 23 17:04:02 EST 2011


I've got an old script I can't quite get working.  What's the best way 
to do a block search and replace across many files?  i.e. the text I'm 
searching and replacing might be a bit longer than a small line.  like:
find:
<body><center>
Replace with:
<body><A href="http://www.example.com">Home</a> : <a 
href="/link2">Link2</a> : <a href="/link3">Link 3</a>

Doing this across a lot of files.  I've been reading a bit on awk but 
it's making my eyes water.  Perhaps there's a utility for linux?

g.





More information about the kwlug-disc mailing list