Date: Tue, 21 Aug 2007 11:28:06 +0200 From: Pieter de Goeje <pieter@degoeje.nl> To: freebsd-questions@freebsd.org Cc: Olivier Nicole <on@cs.ait.ac.th> Subject: Re: Get effective group id Message-ID: <200708211128.07123.pieter@degoeje.nl> In-Reply-To: <200708210720.l7L7KRpU091443@banyan.cs.ait.ac.th> References: <200708210720.l7L7KRpU091443@banyan.cs.ait.ac.th>
index | next in thread | previous in thread | raw e-mail
On Tuesday 21 August 2007, Olivier Nicole wrote:
> 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 -g will get you the egid.
if [ `id -g` -eq 1001 ]; then
echo "It's a hit!"
fi
Hope this helps,
Pieter de Goeje
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708211128.07123.pieter>
