K.S. Bhaskar on 5 Feb 2010 15:30:06 -0800


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

[PLUG] Equivalent of id for groups


I can use the id command in a shell script to determine whether a user
is valid, e.g.,

$ id -u auntsue
9999
$ id -u xyzzy
id: xyzzy: No such user

Is there an equivalent command to check for the validity of a group
name?  I can't scan /etc/group because the group may be defined by
NIS.  Ideally, it should be something that will work on Linux as well
as UNIX flavors.

Thanks in advance.

Regards
-- Bhaskar

-- 
Windows does to computers what smoking does to humans
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug