Search & Replace Issue

Josh Paetzel josh at tcbug.org
Sat Dec 23 20:31:15 PST 2006


On Saturday 23 December 2006 21:29, Jack Stone wrote:
> Appreciate a tip on how to search & replace  hundreds of *.htm 
files:
> >From this:
>
> <li><a href="http://www.domain.com/tales/wouf.html
> To this:
> <li><a href="tales/wouf.html
>
> In other words, I just want the relative path and remove all the
> extra: http://www.domain.htm/  portions of the lines.
>
> Large thanks in advance for help.
>
> Happy Holidays!
> Jack
>

perl -p0777i -e 's/http:\/\/www.domain.com\///g' *.htm

-- 
Thanks,

Josh Paetzel


More information about the freebsd-questions mailing list