I need to have a signon script that when executes will increment a number by one and not send anything to the output file if the number is greater than or equal to 2.

code

#!bin/bash
on=`expr "$on" + 1`
#If else statements to determine if you are already signed on
if [ "$on" -ge 2 ];
then
echo "Already signed on"
exit
fi
#end of if else
#sending data to log.dat
echo "Please enter a comment:"
read comment
echo "-----------------------------------------------------------
Signon:`date`
$comment" >> log.dat

end of code

please help!!!