Results 1 to 1 of 1
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 ...
- 04-05-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
Signon Script with Incrementing Variable
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!!!


Reply With Quote