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

Re: sendmail questions



Gaal Yahas wrote:
> Err. Waitaminute!!! I'm supposed be advocating Perl:
> 
>         perl -lne '/^(.*?):.*?:(\d+)/&&$2>100&&print$1' /etc/passwd
>                 > /etc/allusers
> 
> Darn. Longer :-|
> 
> Well, as Larry Wall put it, "AWK has to be better for something :-)"

Or you could use:

perl -lanF: -e'$F[2]>100&&print$F[0]' /etc/passwd > /etc/allusers

Which is almost the same size ;-)

Gavrie.

-- 
Gavrie Philipson
System Administrator
Netmor Applied Modeling Research Ltd.

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il