[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9987: RFE: 'groups' command ADD command switches "-0", and "-1"

From: Pádraig Brady
Subject: bug#9987: RFE: 'groups' command ADD command switches "-0", and "-1"
Date: Tue, 08 Nov 2011 00:26:34 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]