View Single Post

   
  #3 (permalink)  
Old 02-15-2008, 12:10 PM
Jean-Pierre Radley
 
Posts: n/a
Default Re: search and replace

Bill Campbell typed (on Thu, Mar 04, 2004 at 11:02:40AM -0800):
| On Thu, Mar 04, 2004, Kyle wrote:
| >hi
| >need a little help
| >I would like to search a group of files for text and replace that text with
| >another text.
| >ex.
| >search for numformat 44 and replace with numformat .
|
| You can do this with sed, awk, perl, or other tools with a bit of
| work, or use the GNU shtool, and to it trivially:
|
| shtool subst \
| -e 's/numformat 44/numformat/g' \
| *.txt

Sounds good, but the ftp repositories for shtool only go to 1.5.4, and
there are missing 1.6.x entries. I just grabbed the latest one, and
'subst' is not a sub-command in 1.5.4.

--
JP
Reply With Quote