#!/bin/rc
rfork e
fn usage {
echo usage: `{basename $0} [-l] person@machine >[1=2]
exit usage
}
lflag=()
while(! ~ $#* 0 && ~ $1 -*) {
switch ($1) {
case -l
lflag=1
case -*
usage
}
shift
}
if (! ~ $#* 1)
usage
x=`{echo $1 | awk -F '@' '{ print $1" " $2}'}
switch($#x){
case 1
machine=$x
case 2
person=$x(1)
machine=$x(2)
case *
usage
}
{
echo -n $person
if (~ $lfag 1)
echo -n ' /W '
echo
} | con -nrl tcp!$machine!finger
|