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]Re: [tlug] bash/mail: stop the send if body is blank
- Date: Wed, 12 Jan 2011 14:09:41 +0900
- From: Nguyen Vu Hung <vuhung16plus@example.com>
- Subject: Re: [tlug] bash/mail: stop the send if body is blank
- References: <4D2D0248.9060206@example.com>
On Wed, Jan 12, 2011 at 10:22 AM, Darren Cook <darren@example.com> wrote: > 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 Please try: svn status | egrep -v '(path/to/ignore.me.file)' > a.tmp.file mail -s "svn status report" -c someone2@example.com < a.tmp.file calling mail command from a shell is not bad, but I suggest doing that with script written in python or PHP. > > 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) > > -- > To unsubscribe from this mailing list, > please see the instructions at http://lists.tlug.jp/list.html > > The TLUG mailing list is hosted by the award-winning Internet provider > ASAHI Net. > Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/ > -- Best Regards, Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng ) vuhung16plus{remove}@example.com , YIM: vuhung16 , Skype: vuhung16plus
- References:
- [tlug] bash/mail: stop the send if body is blank
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: [tlug] Forcing programs to run in another language
- Next by Date: Re: [tlug] Forcing programs to run in another language
- Previous by thread: [tlug] bash/mail: stop the send if body is blank
- 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