Date: Wed, 18 Apr 2001 17:25:19 -0500 (CDT) From: Laurence Berland <laurence@isp.northwestern.edu> To: <questions@freebsd.org> Subject: OT:Use perl to substitute a string for another in many files Message-ID: <Pine.LNX.4.30.0104181723500.4364-100000@wiggum.isp.nwu.edu>
next in thread | raw e-mail | index | archive | help
If I've got a bunch of files, that I can list using find, what is the best way, using perl, to substitute every instance of a string with a different string in all these files. Basically I want to run s/a-string/b-string/g in place on each file. Any ideas? I have already hosed some files messing this up once, and don't want to risk doing it again. L: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.30.0104181723500.4364-100000>