Code:
Subject="QM DOWN : Daily Monitoring Report "
MAIL_RECIPIENTS="someone@some.where"
dspmq > tempdspmq.txt.$$
cat tempdspmq.txt.$$
sed -n '/Running/p' tempdspmq.txt.$$ > temp
cat temp
if [ -s "$/clocal/mqbrkrs/user/mqsiadm/sanjay/temp" ]
then
echo "1 DONE"
cat "$/clocal/mqbrkrs/user/mqsiadm/sanjay/temp" | mailx -s "$Subject" $MAIL_RECIPIENTS
echo "2 DONE"
fi
echo "3 DONE"
---------------
Whats wrong in this script ?
I think its not executing the if [ ] statement.
NOTE: you can replace any other command with 'dspmq' that i have written in my script.
Please help ASAP.