Re: whats wrong with find -exec sed?



Chris F.A. Johnson wrote:

In some versions of sed (including recent GNU sed) there is such
an option (not switch -- that's a term from some other OS), and
many people advise against using it.

Interesting. I'm not really seeing why, though.

The accepted method is to use a temporary file and copy or move
that to the original location if the command is successful.

Well, that would make the extremely useful 'find | xargs sed' combo
useless, or at least significantly harder to use, wouldn't it? If one
is afraid of screwing up, the -i option takes an optional suffix for
automatic backups. This particular case seems like an obvious candidate
for in-place editing.

--
PeKaJe
Any thread which begins on a serious subject will become frivolous, and
any thread which begins on a frivolous subject will become serious.
-- Rillion's Second Law
.



Relevant Pages

  • Re: echo not outputing tab using in bash (cygwin)
    ... > have the echo statement have all the power and the ability to switch it off ... Ksh uses whatever the underlying system uses. ... My code in this post is copyright 2005, Chris F.A. Johnson and may be copied under the terms of the GNU General Public License ...
    (comp.unix.shell)
  • Re: echo not outputing tab using in bash (cygwin)
    ... Chris F.A. Johnson wrote: ... have the echo statement have all the power and the ability to switch it off ... Like ksh or perl making this the exception. ...
    (comp.unix.shell)
  • Re: Why is there 6 console?
    ... "Chris F.A. Johnson" writes: ... I can switch to them ... Thanks Chris, I will try it. ... Vilmos ...
    (comp.os.linux.misc)
  • Re: Why is there 6 console?
    ... "Chris F.A. Johnson" writes: ... > the other way, and had 24 consoles. ... And how did you switch to the ones above 12? ...
    (comp.os.linux.misc)
  • Football for Baseball
    ... 193 Chris Simms ... 199 Rudi Johnson ... 225 Mike Peterson ... Marvin Harrison ...
    (rec.collecting.sport.football)