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: Clint Pachl (clintpachlgmail.com)
Date: Mon Oct 03 2005 - 15:36:50 CDT


On 10/3/05, Jolan Luff <jolanprotection.cx> wrote:
> On Mon, Oct 03, 2005 at 06:17:41PM +0000, Christian Weisgerber wrote:
> > Joerg Sonnenberger <joergbritannica.bec.de> wrote:
> >
> > > 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.
> >
> > In the ports tree we just use perl -i.
>
> There are also ports which use sed and dump the output and copy it back
> to the original file. It would be nice to add ${REINPLACE_CMD} and
> standardize on that like FreeBSD has done. They set it to sed -i as
> they do not have perl in their base system. I believe extending sed
> rather than depending on a programming language which lives in the gnu/
> part of the tree is the lesser evil. We already have calls to perl in
> enough weird places (like sparc Makefiles) and it would be nice to
> reduce the number of those in order to make it easier to build embedded
> yet mostly functional systems that don't need 46MB of crap in
> /usr/libdata/perl5. I think compartmentalizing perl invocations into
> variables so that people may provide alternative backends is the best
> way to go even if sed -i does get refused (but I would certainly like to
> see it make its way into the tree).

I agree. I usually do a base install, which is ~110MB, on my dedicated
servers. Amazingly, about 30% - 40% of it is perl crap, which I never
even use!