On Tue, Jul 10, 2018 at 07:34:48AM +0000, Andreas Kusalananda Kähäri wrote:
> On Tue, Jul 10, 2018 at 09:29:55AM +0200, Andreas Kusalananda Kähäri wrote:
> > This is really a question about what the "N" command should be doing if
> > there is no further input.  GNU sed seems to output the current pattern
> > space.
> >
> > POSIX says:
> >
> >         If no next line of input is available, the N command verb shall
> >         branch to the end of the script and quit without starting a new
> >         cycle or copying the pattern space to standard output.
> >
> >
> > Note: "without [...] copying the pattern space to standard output"
> >
> > So this makes me believe that OpenBSD sed is doing the correct thing
> > with regards to the POSIX spec. for sed.

Indeed, this matches the OpenBSD behaviour.

Thank you.

-- 
db

Reply via email to