Thanks for your reply.
I tried adding -l option but it was not recognised as below;
Your "cron" job on 141-1
/export/home/sigvalue/check_bind.sh > /dev/null
produced the following output:
/bin/bash: -l: unrecognized option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command (invocation only)
-abefhkmnptuvxBCHP or -o option
I`m also pasting my script where vaiables take place.
#!/bin/bash -l
TEMPDIR=/export/home/sigvalue/
LOGDIR=/export/home/sigvalue/logs/SMPP_SERVER-A/
CUR_SIZE=`cat $LOGDIR/current.log|wc -l`
PREV_SIZE=`cat $TEMPDIR/current.size`
if [ $CUR_SIZE -eq $PREV_SIZE ]
then
echo "Nothing to do..." > $TEMPDIR/bind.error.diff
exit
fi
if [ $CUR_SIZE -gt $PREV_SIZE ]
then
let STSIZE=$PREV_SIZE+1
sed -n "$STSIZE,$CUR_SIZE p" \
$LOGDIR/current.log \
> $TEMPDIR/bind.error.diff
cat $TEMPDIR/bind.error.diff|egrep "UNBIND|failed|Client Is not connected" > $TEMPDIR/error
if [ -s $TEMPDIR/error ]
then
wget --post-data="serverName=SMPP-A&msgBody=`cat $TEMPDIR/error`"
http://10.1.21.236:8585/pns.asmx/SendEmail
rm $TEMPDIR/error
fi
fi
echo $CUR_SIZE > $TEMPDIR/current.size
Thanks guys