Theo de Raadt([email protected]) on 2021.01.24 16:01:32 -0700:
> Stuart Henderson <[email protected]> wrote:
>
> > On 2021/01/24 12:10, Theo de Raadt wrote:
> > > I completely despise that the option is called "--null".
> > >
> > > Someone was a complete idiot.
> >
> > gnu grep has both --null and -z for this (why do they do that?!).
> > If it's added as --null it should be added as -z too.
> >
> > Looking at Debian codesearch most things using it as --null use other
> > long options that we don't have. Maybe just adding as -z would be
> > enough. It does seem a useful and fairly widely supported feature.
>
> Yes, maybe just add -z.
Actually it's "-Z, --null". The lowercase -z in gnu grep is
-z, --null-data
Treat input and output data as sequences of lines, each
terminated by a zero byte (the ASCII NUL character) instead of
a newline. Like the -Z or --null option, this option can be
used with commands like sort-z to process arbitrary file
names.
Note that we have the -z in sort(1), which at least is consistent.
That also is a non-posix extension.
> > Should have been -0 to match xargs and be similar to find's -print0
> > but it's too late for that now.
>
> Yes it should have been -0.
>
> But unfortunately some an uneducated idiot got involved. None of this
> is standardized. Unix script portability is being ruined by idiots, not
> just the people proposing it or writing it originally, but also the people
> who don't say "wrong" quickly enough. And much of this is because of
> intentional development silos.
>