Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!dclsic!sjc!leia!kitano From: kitano@judy.pa.Yokogawa.CO.JP (Kinichi "Kinchan" Kitano) Newsgroups: comp.sys.hp Subject: How can I know his current group ID? Message-ID: Date: 23 Apr 91 11:00:06 GMT Sender: news@leia.pa.yokogawa.co.jp Distribution: comp Organization: Yokogawa Electric Corporation,Tokyo,Japan Lines: 36 Hello. I use HP9000/800 with HP-UX7.0. What I want to know is the group ID of every person who is logging in the system. So foo belongs to several groups(A,B,C). Before he does job X, he does newgrp A and he works under group ID A. I want a command, say wgrp, which returns a current group ID of a user. The result would be like this. foo me $ newgrp A $ wgrp foo A $ newgrp B $ wgrp foo B I checked manual of who and ps but had no luck. Command with little known options, shell script(with awk,perl) or C program: any solutions will be fine. Of cource, HP specific solutions are welcome. thanks in advance. -- ==================================================================== Kinichi Kitano (kitano@pa.yokogawa.co.pa) =====================================================================