The problem is with this code:
words=`wc -l /home/tmp/logged.log | awk '{print $1}'`;
if [ $words == 26 ]
then
echo $words
echo Good
else
echo Not so good
fi
it always returns the else statement. Even tho the result is 26.
I also tried
words=`wc -l < /home/jonathan/tmp/logged.log`;
try to use
[ $words -eq 26 ]instead of[ $words == 26 ]or
[ 26 == 26 ]to check that statement works properly