GNU bug report logs -
#9987
RFE: 'groups' command ADD command switches "-0", and "-1"
Previous Next
Reported by: Linda Walsh <coreutils <at> tlinx.org>
Date: Mon, 7 Nov 2011 22:31:01 UTC
Severity: normal
Merged with 12083
Done: Bernhard Voelker <mail <at> bernhard-voelker.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
PC!draig Brady wrote:
> On 09/22/2013 03:08 AM, Linda Walsh wrote:
>>
>> GNU bug Tracking System wrote:
>>> Your bug report
>>>
>>> #9987: RFE: 'groups' command ADD command switches "-0", and "-1"
>>>
>>> which was filed against the coreutils package, has been closed.
>>>
>>> The explanation is attached below, along with your original report.
>>> If you require more details, please reply to 9987 <at> debbugs.gnu.org.
>> ----
>> + id accepts a new option: --zero (-z) to delimit the output entries by
>> + a NUL instead of a white space character.
>> ----
>>
>> Curious: how many commands use "-z" to emit output with "0"
>> termination vs. something commands that have switches with "0" in them?
>
> === -0 ===
> du (since v5.1.0) (POSIX doesn't mention -0)
> env (since v8.0)
> printenv (since v8.0)
>
> === -z ===
> basename
> dirname
> id
> join
> readlink
> realpath
> shuf
> sort
> uniq
>
> sed
> grep
----
Some of those are fairly new. At least id & join aren't even in my manpages yet.
The others using -z are fairly new. and the use of -z w/sed and grep is
suspect given their long options both refer to "null",
You left out find & xargs -- which ARE core utilities even if they are not
part of coreutils ;-).
It seems like -0 was the standard in the initial utils -- probably
because the word 'zero' in 17 out of hundreds of words for '0' in
other languages, but the arabic number system is used in almost all (if not all)
countries/languages.
It seems like someone, in the past few years, didn't follow the pre-existing
standard for such functionality. Since "-z" is only a recent addition compared
to the non-locale-specific, "-0", wouldn't it make sense to try to use
"-0" where it doesn't conflict, since -z can't be used in tools like
grep as it indicates that input files are null terminated and uses -Z
for output. I thought -0 might conflict somewhere, but it seems it
wouldn't conflict in any of the utilities.
Wouldn't it be a better choice -- especially considering it is international?
Or... was there some reason why -z was chosen, as it makes the
switches less consistent and more confusing...(especially given the age of
the switches and that -Z has other meanings)...
This bug report was last modified 11 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.