On Fri, 16 Jan 2004, Darren Freeman wrote:
> The following line entered at a shell will print my UID:
>
> gawk -F ':' '/dfreeman:*/ {print $3}' </etc/passwd
Or
% id -u dfreeman
The original would match fredfreeman too.
So that form probably should be:
% gawk -F ':' -v uname=$UNAME '$1 == uname {print $3}' </etc/passwd
--
Brett