OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: [patch] sed(1) - edit files in-place

From: Joerg Sonnenberger (joergbritannica.bec.de)
Date: Mon Oct 03 2005 - 06:39:50 CDT


On Sun, Oct 02, 2005 at 10:06:50PM -0600, Theo de Raadt wrote:
> Here's a patch (ported from FreeBSD) that adds in-place editing support
> to sed(1).
>
> The problem is that when one starts making extensions like this to
> POSIX-mandated commands, people then start using them in shell scripts
> and the script becomes unportable. So I want to think about this for
> a bit. It does not strike me as the most useful diff.

Let me add two comments about this specific feature. The first is that
it is very handy for patching third party source code, since it saves
the hassle of reverting to ed or having to copy the files first. The
second comment is that the GNU implementation sucks in that it can't
correctly parse the argument. I'm speaking about "-i .orig" vs.
"-i.orig".

Joerg