Thanks got mine like this. open (TFH,"</etc/passwd"); @data = <TFH>; foreach $line(@data) { ($user,$pass,$uid,$gid,$info,$home,$type) = split /:/, $line; }
$a = ($uid + 1); bit shitty if your pass files get's to long. ----- Original Message ----- From: "Maxim Berlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 3:44 PM Subject: Re: UID's > Hello Christo, > > Tuesday, December 04, 2001, Christo Rademeyer <[EMAIL PROTECTED]> wrote: > > CR> Hi how can I do this in perl ? srdof the same thing? > CR> tail -n5 /etc/passwd | cut -d: -f3 > > CR> <- > = ->> > CR> 23 > CR> 77 > CR> 100 > CR> 501 > CR> 501 > for example, you can write > my @uids=`tail -n5 /etc/passwd | cut -d: -f3`; > > what do you need, exactly? trying to parse /etc/passwd? > take a look at sample in > perldoc -f split > > Best wishes, > Maxim mailto:[EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]