i was trying to make this example in shell book to run

$ cat on
#
# determine if someone is logged on
#

user="$1"

if who | grep "^$user " > /dev/null
then
        echo "$user is logged on"
else 
        echo "$user is not logged on"
fi
$

i have chmod +x on and use hp system and use korn shell.
why every time i tried it said , unknow host name?

exp :  
$ on huangcy
unknow host name

it suppose to display either user log on or not log on.
please help man thanx

Reply via email to