in reply to Re: parsing output of UNIX `who` command
in thread parsing output of UNIX `who` command

Fore.

perl -le'$x{(split)[0]}++for(`who`);print"$k => $v"while($k,$v)=each%x +'

Or

who|perl -lane'$x{$F[0]}++;END{print"$k => $v"while($k,$v)=each%x}'