Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Moving UID/GID assignments to api.gentoo.org (v2)
Date: Sat, 17 Aug 2019 07:38:42
Message-Id: 897643dce37f7f7ec83d4146a911f0409f4b0364.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Moving UID/GID assignments to api.gentoo.org (v2) by "Michał Górny"
1 On Sat, 2019-08-17 at 09:06 +0200, Michał Górny wrote:
2 > Hi,
3 >
4 > Here's v2 of my proposed format.
5
6 Also example usage:
7
8 get user/group named 'adm'
9
10 $ awk '$1 == "adm"' uid-gid.txt
11 adm 3 4 baselayout
12
13 get records for UID 3:
14
15 $ awk '$2 == 3' uid-gid.txt
16 adm 3 4 baselayout
17 bin 3 7 baselayout-fbsd
18
19 get records for GID 4:
20
21 $ awk '$3 == 4' uid-gid.txt
22 adm 3 4 baselayout
23 tty 4 4 baselayout-fbsd
24
25 get all users, sorted by UID:
26
27 $ awk '$0 ~ /^[^#]/ && $2 != "-"' uid-gid.txt | sort -k2 -n
28 root 0 0 baselayout
29 root 0 - baselayout-fbsd
30 toor 0 - baselayout-fbsd FreeBSD lists both names in passwd
31
32 get all groups, sorted by GID:
33
34 $ awk '$0 ~ /^[^#]/ && $3 != "-"' uid-gid.txt | sort -k3 -n
35 root 0 0 baselayout
36 wheel - 0 baselayout-fbsd
37 bin 1 1 baselayout
38
39 --
40 Best regards,
41 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature