There's no need to have the subroutines inside the loop and I changed the line with WHILE on it... other than that it looks okay; however I didn't test it so look it over. I'm assuming the value for $response comes from somewhere else...
clear
ans='y'
notfound()
{
echo $response " is not logged in"
}
found()
{
echo $response "is logged into " $name
}
while [ $ans == 'y' ]
do
name=`ps -eaf | grep "\<$response\>" | cut -b 80-85`
if [$name != "<$response\>"]
then
name=`rsh server2 ps -eaf | grep "\<$response\>" | cut -b 80-85`
elif [$name != "<$response\>"]
then
name=`rsh server3 ps -eaf | grep "\<$response\>" | cut -b 80-85`
elif [$name != "<$response\>"]
then
name=`rsh server4 ps -eaf | grep "\<$response\>" | cut -b 80-85`
elif [$name != "\<$response\>"]
then
notfound
else
found
fi
echo -n "New search? [y/n]: "
read ans
done
For continuity's sake, this is a continuation of this post. I'm not sure what the error is referring to, since the script you listed only contains 70 lines (including the blank lines).