Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] bash/mail: stop the send if body is blank
- Date: Wed, 12 Jan 2011 10:22:16 +0900
- From: Darren Cook <darren@example.com>
- Subject: [tlug] bash/mail: stop the send if body is blank
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7
I have this script that runs daily: #!/bin/bash cd /path/to/website/root svn status | egrep -v '(path/to/ignore.me.file)' | mail -s "svn status report" -c someone2@example.com someone@example.com It is a website and the idea is that if someone has been modifying files directly this email will inform me so I can check-in their changes. The problem is if there are no changes I get *two* emails, one is an unwanted blank email, and the second is an even-more-unwanted email telling me I just sent a blank email. How do I stop it sending blank emails? I cannot see a mail option for it so I'm guessing this is a bash question? I.e. svn status | BASH-MAGIC-HERE mail -s "..." someone@example.com Thanks in advance, Darren -- Darren Cook, Software Researcher/Developer http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- Follow-Ups:
- Re: [tlug] bash/mail: stop the send if body is blank
- From: Nguyen Vu Hung
Home | Main Index | Thread Index
- Prev by Date: [tlug] Buying eToken PRO 64K or alternative in Japan.
- Next by Date: [tlug] Forcing programs to run in another language
- Previous by thread: Re: [tlug] Buying eToken PRO 64K or alternative in Japan.
- Next by thread: Re: [tlug] bash/mail: stop the send if body is blank
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links