[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting users IDs list



Way cool!  I didn't know you could place a 'while' after a statement 
like you would with an 'if'.  Very neat.

-shane

> $ perl -le 'print $a[0] while @a = getpwent' # user names
> $ perl -le 'print $a[0] while @a = getgrent' # group names
>
> Or, you can write an equivalent C program, but why? :)
>
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 
> 0095
> <merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl 
> training!
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev@xxxxxxxxxxxxx
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>