Re: [SLUG] Global Search and Replace

From: Paul M Foster (paulf@quillandmouse.com)
Date: Fri Jan 05 2007 - 19:01:46 EST


Ian C. Blenke wrote:
> Paul M Foster wrote:
>
>> Folks:
>>
>> Anyone know of a nifty tool which will do a global search and replace
>> of text inside a bunch of files, all at once?
>
>
> find / -type f -exec perl -pi -e 's/somestring/someotherstring/g' {} \;
>
> or something more complex?
>

The above will do, but I also found a command line utility which does
the same thing, called "rpl". It's its own package under Debian, and is
actually a python script rewrite of a non-free utility by the same name.

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:28:27 EDT