[kwlug-disc] Block level search and replace

jvj at golden.net jvj at golden.net
Wed Feb 23 17:12:18 EST 2011


 You're on the right track with awk. You can also try sed, ssed or perl.
 But they all use the same regex pattern matching techniques, with 
 twists.
 I do not know for sure but I ssuptect that one or more of these are 
 avaiulable in Linux.
 JohnJ

 On Wed, 23 Feb 2011 17:04:02 -0500, "Insurance Squared Inc." 
 <gcooke at insurancesquared.com> wrote:
> 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.
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org





More information about the kwlug-disc mailing list