From owner-freebsd-questions@FreeBSD.ORG Tue Aug 21 09:26:19 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451FA16A49A for ; Tue, 21 Aug 2007 09:26:19 +0000 (UTC) (envelope-from barry.byrne@wbtsystems.com) Received: from hermes.wbtsystems.com (hermes.wbtsystems.com [193.120.231.28]) by mx1.freebsd.org (Postfix) with ESMTP id B472C13C46C for ; Tue, 21 Aug 2007 09:26:18 +0000 (UTC) (envelope-from barry.byrne@wbtsystems.com) Received: from SUNYA (sunya.wbt.wbtsystems.com [10.12.1.136]) by hermes.wbtsystems.com (Postfix) with ESMTP id B1D69F7425; Tue, 21 Aug 2007 10:09:23 +0100 (IST) From: "Barry Byrne" To: "'Olivier Nicole'" , References: <200708210720.l7L7KRpU091443@banyan.cs.ait.ac.th> Date: Tue, 21 Aug 2007 10:09:22 +0100 Message-ID: <001601c7e3d2$f6e8aeb0$88010c0a@dublin.wbtsystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: Acfjw+hex7r2k4m8SGu1qtTxm0IEEQADuBsA In-Reply-To: <200708210720.l7L7KRpU091443@banyan.cs.ait.ac.th> Cc: Subject: RE: Get effective group id X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 09:26:19 -0000 > 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