[oclug] Search & Replace

Michael P. Soulier msoulier at digitaltorque.ca
Thu Jul 8 15:43:30 EDT 2004


On 07/07/04 Tobias Luetke said:

> I need to change the coding style in a relatively large scripting code base. 
> 
> I wrote up several regexp replace strings to do the operations i need
> but i'm at a loss for tools.
> 
> Is there a convenient tool ( or chain of tools ) to apply a regexp
> search & replace on a list of files ?

perl -pi -e 's/search/replace/' $(find files to replace)

Mike

-- 
Michael P. Soulier <msoulier at digitaltorque.ca>
The major advances in civilization are processes that all but wreck the
societies in which they occur.
-- Albert North Whitehead
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20040708/d693eb03/attachment.bin


More information about the OCLUG mailing list