bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sed feature request


From: Karl Berry
Subject: Re: sed feature request
Date: Wed, 24 Sep 2003 18:24:50 -0400

    version of sed.  This seems silly, so I think I'm probably just missing 
    something about how sed should be properly used.

I don't think so.  It was a basic design principle, more or less, not to
put a edit-in-place feature into every program (sort being the one
exception I can think of off the top of my head).

I seem to recall that Software Tools (or one of the seminal Unix books,
maybe The Unix Design Philosophy) discussed implementation of an
"overwrite" script that would be invoked like time, xargs -- "overwrite
command file" and handle it for most every program.  That seems like a
lot more rational approach, if it really works.  I don't recall it ever
becoming a standard part of any distribution, though.  Maybe it should
be a new script in coreutils :).

As you may know, Perl has the same -i feature as the BSD sed you describe.

The script isn't such a big deal, anyway:

for f in *; do
  sed ... $f >$f.tmp
  mv $f.tmp $f
done

Happy hacking,
karl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]