Re: whats wrong with find -exec sed?
- From: Peter Kai Jensen <usenet@xxxxxxxxxxxxxxxxxxxxx>
- Date: 02 Nov 2006 20:55:32 GMT
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
.
- Follow-Ups:
- Re: whats wrong with find -exec sed?
- From: Michal Nazarewicz
- Re: whats wrong with find -exec sed?
- References:
- whats wrong with find -exec sed?
- From: tom
- Re: whats wrong with find -exec sed?
- From: tom
- Re: whats wrong with find -exec sed?
- From: Sybren Stuvel
- Re: whats wrong with find -exec sed?
- From: tom
- Re: whats wrong with find -exec sed?
- From: Robert Newson
- Re: whats wrong with find -exec sed?
- From: tom
- Re: whats wrong with find -exec sed?
- From: Chris F.A. Johnson
- whats wrong with find -exec sed?
- Prev by Date: Re: whats wrong with find -exec sed?
- Next by Date: Re: whats wrong with find -exec sed?
- Previous by thread: Re: whats wrong with find -exec sed?
- Next by thread: Re: whats wrong with find -exec sed?
- Index(es):
Relevant Pages
|