#!/bin/csh -f # lists processes on a range of terminals # need to establish whether we are using Solaris or SunOS UNIX if (`uname -r` =~ 5*) then set os=solaris else set os=sunos endif # set start=$1 while ($start <= $2) if ($os == solaris) then ps -tpts/{$start} else ps -tttyp{$start} endif @ start++ end