script on user who logged in????

writing a script that will check every 5 seconds whether a particular user has
logged into the system

# Determine if someone is logged on
# Version 4.0
if [ �$#� ne
1 ]
then
echo � Incorrect number of arguments�
echo �Usage: $ ison4 <user>�
else
user=�$1�
if who | grep �$user� > /dev/null
then
echo �$user is logged on�
else
echo �$user is not logged on�
fi
fi

is this ok

I don't see the loop and the "sleep 5" but as the body of that missing loop, this looks okay (though mind-numbingly verbose -- I guess you want to take out the "is not" case once you have made sure it works correctly).

how about converting this:

echo �Usage: $ ison4 <user>�

to:

echo �Usage: $0 username�

are you planning to run this script using watch ?