?
Solved

GID from ksh

Posted on 1997-06-12
3
Medium Priority
?
316 Views
Last Modified: 2010-07-27
My SVR4 system runs several programs which need their own group id. I use newgrp for users to be able the different programs.

How van I determine the GID choosen to take actions according?

TIA
0
Comment
Question by:jdsmspro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:mlev
ID: 2006393
On some systems, `id -g` gives you the answer.
I don't remember whether SVR4's id is "nice" or "dumb".
Even in the latter case, though, you can manipulate the output of "id".
0
 
LVL 1

Accepted Solution

by:
henrys earned 400 total points
ID: 2006394
Try this:

(all on one line, of course)

gid=`/usr/bin/id | cut -d ' ' -f 2 | cut -d '=' -f 2 | sed -e 's/(.*)//'`
0
 

Author Comment

by:jdsmspro
ID: 2006395
id -a gives all groups. Otherwise it´s the dumb version.

Thanx1
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question