On 9/24/2001 4:00 PM, "Riggs, Joan" <[EMAIL PROTECTED]> wrote:
>
>> I am not a Perl programmer but I need help - does anyone do Unix Perl
>> scripting that can assist me?
>> I am sure it's pretty basic coding ... I need to parse out the
> /etc/group
>> file to list all users and the groups they are in.
Huh? Nothing is BASIC when you need a 'solution' - therefore basic may
equal trivial and trivial may equal not what you need...
At any rate - Here is something to get you started (you may need to fix
formatting issues because of mailing...) --
(This is a code fragment - not meant to work on it's own...)
my ($account, $passwd, $uid, $gid, $quota, $comment, $gcos, $home, $shell);
while (($account, $passwd, $uid, $gid, $quota,
$comment, $gcos, $home, $shell) = getpwent())
{
$gcos = ''; # These two are not used...
$quota = '';
$passwd = '';
$shell = '';
... Do stuff ...
}
The things you should become familiar with -
perldoc -f getpwent
perldoc -f setpwent
HTH;
-Sx-
William C (Bill) Jones
Lead, Courseware Support Analyst
(Lead e-Systems Developer)
Florida Community College at Jacksonville
501 West State Street, Rm 229
Jacksonville, Florida 32202-4030
[EMAIL PROTECTED]
PHONE (904) 632-3089
FAX (904) 632-3007
__________________________________________________________________
"I know you believe you understand what you think I said, but I am
not sure you realize that what you heard is not what I meant."
::: Richard Nixon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]