Date: Sun, 24 Dec 2006 12:09:20 -0800 From: Garrett Cooper <youshi10@u.washington.edu> To: freebsd-questions@freebsd.org Subject: Re: Search & Replace Issue Message-ID: <458EDE70.4050008@u.washington.edu> In-Reply-To: <BAY125-F30049BC3F42C8F2E17BA61CCC30@phx.gbl> References: <BAY125-F30049BC3F42C8F2E17BA61CCC30@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
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 cat file.html | sed -e "s|http://www.domain.com||g" > file.tmp.html && mv file.tmp.html file.html -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?458EDE70.4050008>