Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2007 10:09:22 +0100
From:      "Barry Byrne" <barry.byrne@wbtsystems.com>
To:        "'Olivier Nicole'" <on@cs.ait.ac.th>, <freebsd-questions@freebsd.org>
Subject:   RE: Get effective group id
Message-ID:  <001601c7e3d2$f6e8aeb0$88010c0a@dublin.wbtsystems.com>
In-Reply-To: <200708210720.l7L7KRpU091443@banyan.cs.ait.ac.th>
References:  <200708210720.l7L7KRpU091443@banyan.cs.ait.ac.th>

next in thread | previous in thread | raw e-mail | index | archive | help

> Hi,
> 
> >From a Bourne shell script, how to get (and test) the group id of the
> user that is executing the script?
> 
> Best regards,

Olivier:

id -gn   should give you the group name. Drop the -n if you want just the
numberic id.

 - barry




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001601c7e3d2$f6e8aeb0$88010c0a>