Re: [ilugd] Shell script not running as expected via crontab, runs fine manually !!

2012-02-27 Thread selvamuthukumar v
On Mon, Feb 27, 2012 at 12:26 PM, Amit Sharma amit_...@yahoo.com wrote:  Hi, I have written a following shell script: #!/bin/bash # Script to check exim mailq at a specified interval echo `date` /adminscripts/logs/eximcount echo `exim -bpc` /adminscripts/logs/eximcount if [ `exim -bpc`

[ilugd] Shell script not running as expected via crontab, runs fine manually !!

2012-02-26 Thread Amit Sharma
 Hi,   I have written a following shell script:   #!/bin/bash # Script to check exim mailq at a specified interval echo `date` /adminscripts/logs/eximcount echo `exim -bpc` /adminscripts/logs/eximcount if [ `exim -bpc` -gt 0 ] then cat /adminscripts/logs/eximcount |mail -s Count of EXIM Mailq on 

Re: [ilugd] Shell script not running as expected via crontab, runs fine manually !!

2012-02-26 Thread Raj Mathur (राज माथुर)
On Monday 27 Feb 2012, Amit Sharma wrote: #!/bin/bash # Script to check exim mailq at a specified interval echo `date` /adminscripts/logs/eximcount echo `exim -bpc` /adminscripts/logs/eximcount First of all, why the needless complexity? You can just: date /adminscripts/logs/eximcount