#!/bin/csh
# Improved version of "users" command, 'cos "users" only spots remote
# connections!

set q = `who | sort | awk '{print $1}' | uniq`

if ( $#argv == 0 ) then
  echo $q; exit
endif

if ( $#argv == 1 && $1 == "-1" ) then
 foreach w ( $q[*] )
  echo "	"$w
 end
 exit
endif

echo "Usage: users2 [-1]"
