I'm using perl to report on users on an AIX system. The input is
For those who don't know AIX the input lines look something like
This is what I'm trying to parse but you should note that the 'gecos' field may, or may not exist.
My first thought was to use somethign like
This works fine except that the gecos field has a space in it. I've wracked my brains trying to find a way to parse it. Any ideas would be very welcome.
Thanks
Ceci n'est pas une signature
Columb Healy
Code:
foreach ( `lsuser -a id pgrp gecos ALL` )
Code:
fblogs id=12345 pgrp=usergroup gecos=Fred Blogs
My first thought was to use somethign like
Code:
my ( $username, @data ) = split /\s+/;
foreach ( @data )
{
my ( $key, $value ) = split /=/;
$userdata{$key} = $value;
}
Thanks
Ceci n'est pas une signature
Columb Healy