well, blew it... sed or perl q again.

Roland Smith rsmith at xs4all.nl
Tue Dec 30 20:16:27 UTC 2008


On Tue, Dec 30, 2008 at 11:31:14AM -0800, Gary Kline wrote:
> 	The problem is that there are many, _many_ embedded 
> 	"<A HREF="http://whatever> Site</A> in my hundreds, or
> 	thousands, or files.  I only want to delete the
> 	"http://<junkfoo.com>" lines, _not_ the other Href links.
> 
> 	Which would be best to use, given that a backup is critical?
> 	sed or perl?

IMHO, perl with the -i option to do in-place editing with backups. You
could also use the -p option to loop over files. See perlrun(1).

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20081230/7915c8f1/attachment.pgp


More information about the freebsd-questions mailing list