#!/bin/sh -
#
# ruptime: ssh to uptime on the host(s) given as argument(s), or on
#  all the student hosts if none given. A simulation of what
#  the "real" ruptime was meant to do!
#
if [ $# != 0 ]; then
  hosts="$*"
else
  hosts=`sed 's/#.*$//' $LOCALLAB/lib/student_hosts.cf`
fi

for host in $hosts ; do
  ssh -n -x $host "uptime | sed 's/^[ 	]*//'" 2>&1 | sed "s/^/$host:	/"
done #for host
