The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-20-2007
varungupta varungupta is offline
Registered User
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 187
if [ -s $File ] ; Whats wrong in this ??

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.

Last edited by vino; 08-20-2007 at 12:48 AM.. Reason: Edited email address and added code tags
Reply With Quote
Remove advertisements
!!
Forum Sponsor