This is a discussion on Re: [patch] sed(1) - edit files in-place within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Mon, Oct 03, 2005 at 06:17:41PM +0000, Christian Weisgerber wrote: > Joerg Sonnenberger <joerg@britannica.bec.de> wrote: > > > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Mon, Oct 03, 2005 at 06:17:41PM +0000, Christian Weisgerber wrote: > Joerg Sonnenberger <joerg@britannica.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). |