![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with Cron Email Notification | sasaliasim | AIX | 1 | 04-29-2008 12:02 PM |
| Alert When a Process Exceeds a CPU Utilization Limit... | pbsrinivas | Shell Programming and Scripting | 4 | 06-20-2007 08:38 AM |
| How to add email notification in scripts? | redlotus72 | UNIX for Dummies Questions & Answers | 2 | 03-14-2005 08:19 AM |
| Why am I not recieving email notification? | Kelam_Magnus | Post Here to Contact Site Administrators and Moderators | 6 | 09-03-2002 10:01 PM |
| email notification if job is killed/dies | jacob_gs | Shell Programming and Scripting | 2 | 05-15-2002 02:29 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Counting Files and send an email Notification if it exceeds a limit
Hi,
I am trying to write a script to Count Files in a directory located on a remote server and send an email Notification if it exceeds a limit. The code given below doesnot check the condition and sends the mail everytime irrespective of the condition. I have put this script in the cron. Can anybody please point out the mistake I am making. #!/bin/ksh limit=50 file_length= rsh invuk "ssh poller "ls -ltr /var/spool/get | wc -l"" if [ $file_length -ge $limit ]; then echo "Test mail." |mailx xyz@yahoo.com fi Thanks. Last edited by amitsayshii; 07-07-2006 at 08:11 AM.. |
|
||||
|
Quote:
i doubt here, where is the value that is returned is assigned to file_length, something like, Code:
file_length=`ssh abc_server /usr/bin/ls -l /tmp | /usr/bin/wc -l` |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|