[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Collective memory query



On Mon, Sep 27, 2004 at 12:48:03PM +0100, Dale Amon wrote:

> A couple years ago I ran across a sed like program
> that will recursively descend through a tree and apply
> specified edits in place. I have searched my notes,
> gone through the deb available and have not been able
> to find it. Might just have been something on
> SourceForge...
> 
> Has anyone else run across a program of this nature?

My favourite method:

for foo in `find . -name "something"`
do
ed $foo << END
,s/something/else/g
w
q
END
done

This is doubtless less efficient than having find(1) drive ed directly.
It has the advantage, however, of working everywhere consistently without
requiring some new sed(1) or Perl or the like.

-- 
Mason Loring Bliss   mason@acheron.middleboro.ma.us   Oderint dum metuant!
https://bliss.dyndns.org/    awake ? sleep : random() & 2 ? dream : sleep;

Attachment: pgpN_XRwyYBys.pgp
Description: PGP signature


Reply to: