On linux, in order to run a process under a different group, you can use the
sg command. For example,
sg <groupname> -c 'id -g'
prints out the group id of the group name "groupname". Note that
newgrp can not be used in shell scripts to achieve this.
Is there an equivalent command for solaris? Does the solution also work on my solaris 5.8?