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

Re: man grep




Jay Link wrote:
> 
> >     perl -ne 'print if ((split /:/)[2]<=150);' /etc/passwd
> 
> Ah, the master has spoken!
> 
> >     awk -F: '{if (($3>0)&&($3<=150)){print}}' /etc/passwd
> 
> The golden keyboard is yours.

Ah, 'bout time someone brought up awk. :)  But how necessary is the $3>0
part?  Can there be negative UIDs?  I know some places have nobody as
UID 65535, which equates to -1 in a 16bit environment, but in the passwd
isn't it still 65535?

--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.