[plug] Find and Replace in multiple files
Harry McNally
harrymc at decisions-and-designs.com.au
Sat Jul 12 19:16:17 WST 2003
On Sat, 12 Jul 2003 11:33:08 +0800 Weirdo <linuxalien at optusnet.com.au> wrote:
> He would have an input string "!***" and a replace string "!*->"
> It needs to be ether a shell command or a script where the input and
> replace strings are set at the top or somewhere easy to find.
> Thanks
> Tim
Saturday brain fade meant I needed to google:
perl one-liner "search and replace"
gave:
http://forums.devshed.com/archive/6/2003/02/2/51863
so you can do this:
perl -pe 's/!\*\*\*/!\*-/g' *
Try it in a temporary directory on a test file, Tim.
All the best
Harry
--
linux.conf.au 2004 The Australian Linux Technical Conference
http://lca2004.linux.org.au/ 12-17 January 2004, Adelaide, South Australia
Are you a computer angel? http://www.computerangels.org.au/
More information about the plug
mailing list