GNU bug report logs - #34672
id: add "--numeric" option

Previous Next

Package: coreutils;

Reported by: Giuseppe Scrivano <gscrivano <at> gnu.org>

Date: Tue, 26 Feb 2019 20:37:02 UTC

Severity: wishlist

Tags: notabug

Full log


View this message in rfc822 format

From: Giuseppe Scrivano <gscrivano <at> gnu.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 34672 <at> debbugs.gnu.org, Giuseppe Scrivano <gscrivano <at> gnu.org>
Subject: bug#34672: [RFC] id --numeric
Date: Thu, 28 Feb 2019 11:00:03 +0100
Hi Bernhard,

Bernhard Voelker <mail <at> bernhard-voelker.de> writes:

> Thanks for the patch.
>
> What is the use case?  I mean, if one wants only the numeric numbers,
> then this is usually in a script for automatic processing, and then
> I thinks it's clearer to have uid and group/groups separated:
>
>   $ id -u
>   1000
>
>   $ id -g
>   100
>
>   $ id -G
>   100 454 457 480 492
>
> There's even a -z option to separate by NULs instead of white space.
>
> And, when still needing all in the same output, one could filter like e.g.:
>
>   $ id | sed 's/([^)]*)//g'
>   uid=1000 gid=100 groups=100,454,457,480,492
>
> So I'm currently 40:60 to add it.

as I said, it doesn't really add anything.  It is just an aesthetic
shortcut that I find useful when using Linux user namespaces.  In that
use case the uid->username lookup doesn't make much sense.

Regards,
Giuseppe




This bug report was last modified 6 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.