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

Re: shell cmd: group name from gid?



Paul Miller wrote:
  >Using bash, how can I get the group name of a gid?

Like this:

$ grep :27: /etc/group
sudo:x:27:


and to refine it:

$ grep :27: /etc/group | awk -F: '{print $1}'
sudo


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                                  http://lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1




--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: