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
On 11/07/2011 10:27 PM, Linda Walsh wrote:
>
>
>
> I'd like to request an RFE for the groups command to add 2 switches:
>
> -1 - print groups in 1 column (cf. ls -1)
> -0 - print groups followed by null (cf. find et al)
>
> reasons: have groups with spaces in them.
> provide ultimate safety/futureproof with -0
>
> ??
> reasonable?
Hmm. I suppose by extension that `id -Gn` should accept -1 too.
But do you really want to support group names with spaces?
`groupadd` for example won't allow this.
I suppose integration with LDAP etc. might get arbitrary group names.
Note POSIX is quite specific about the output format for `id`:
"−G Output all different group IDs (effective, real, and supplementary) only, using the
format "%u\n". If there is more than one distinct group affiliation, output each
such affiliation, using the format " %u", before the <newline> is output."
That suggests to me that \n is used to distinguish the three types of IDs.
So -1 would have to override that functionality.
cheers,
Pádraig.
This bug report was last modified 11 years and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.