[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
- References:
- Q
- From: Erez Doron <erez@savan.com>
- Re: Q
- From: abel@bfr.co.il (Alexander L. Belikoff)
- Re: Q
- From: Erez Doron <erez@savan.com>