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

Re: Q



Erez Doron writes:
 > Well everybody think this is a trevial question ???
 > 
 > well in /etc/passwd, if you leave one empty line,
 > all users in the next lines are ignored !!!
 > 
 > so doing grep ^$USER_NAME_I_SEARCH: /etc/passwd will give
 > a wrong answer
 > 
 > Regards
 > Erez

Big deal:

awk '/^[ \t]*$/ {exit 0}; /^erez:/' /etc/passwd

I don't think anyone said that his favourite one-liner was a
complete fool-proof solution. Embellish it as you wish.

Oleg Goldshmidt                
goldshmt@netvision.net.il