NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/50111: sed does not support \n newline in replacement patterns.
The following reply was made to PR bin/50111; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: Anthony Howe <achowe%snert.com@localhost>, gnats-bugs%NetBSD.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/50111: sed does not support \n newline in replacement patterns.
Date: Sun, 2 Aug 2015 00:10:10 -0400
On Aug 1, 5:19pm, achowe%snert.com@localhost (Anthony Howe) wrote:
-- Subject: Re: bin/50111: sed does not support \n newline in replacement pat
| > it will always be non-portable to do so - whatever NetBSD's (or gnu's) sed
| > decides to do. If you really want to use non-portable extensions, just
| > require & use gnu sed and be done with it.
|
| So you're happy to introduce some GNU tools, like GNU grep, but not sed.
| Or move tools a little bit forward into 21st century. Happy to adopt
| GNU -- options, but poo poo handling of \n. Took me two hours to figure
| out why "\n" wouldn't work. I'm not a Linux fan, but some extensions
| just should be. I balloted POSIX.2 in '90s. Portability is a mantra,
| but some things that people just expect as given should be supported.
Actually we are actively trying to limit the use of GPL code in the base
system. We have a BSD version of grep for example in the tree, but it is
not the default yet. We also try to port interesting features from the GNU
tools to help with compatibility. The \n feature could be one of them.
The comment above 'it will always be non-portable' refers to today's state;
most sed implementations, don't recognize \n. It is always easier for
us to fix a PR when there is patch with it. Otherwise we have to do most
of the work, and adding \n to sed, might not be our highest priority.
christos
Home |
Main Index |
Thread Index |
Old Index