Re: regular expression search and replace
Chad Simmons <[email protected]> Tue, 6 Sep 2005 14:40:43 -0700 (PDT)
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <[email protected]> |
--- Michael Barton <[email protected]> wrote: > [red ~/test/]$ perl -pe 's/REMOVE_BIT\(/remove_bit(&/g' -i *.c > > ...I'd make a backup first. > > Oh, and real men write their code with echo. Or maybe cat. > echo '#include <stdio.h>' >> test.c > > --Palrich. Actually if you do perl -pe 's/REMOVE_BIT\(/remove_bit(&/g' -i.BAK *.c it will automatically backup the files, appending a .BAK extension. -----BEGIN GEEK CODE BLOCK----- Version 3.12 GCS/IT/L/S/O d-(+) s++: a-(?) C++++$ UBLS++++$ P+++(--)$ L++++$ E--- W+$ N !o K? w(---) !O M- !V PS+ PE(-) Y+ PGP->+ t+ 5 X++ R(+) tv+@ b+(++) !DI+++ D G(-) e>+++ h---() r+++ y+++(++) ------END GEEK CODE BLOCK------ ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom