[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] MacOSX email



On 4 Oct 2012, at 20:59, Brian Candler wrote:

> On Thu, Oct 04, 2012 at 07:29:54AM +0000, Jewell, Chris wrote:
>> A workaround, for now, is to create bash wrapper for the mailer:
>> 
>> #!/bin/bash
>> 
>> cat - | /usr/bin/mail $1 "$2" $3
>> 
>> exit 0
>> 
>> 
>> Remarks:
>> 
>> 1)  The second command line argument must be enclosed in quotes, or the subject line get broken up.
> 
> Aside: the other args should be quoted too, because you never know when an
> argument might contain a space.
> 
> A safer approach is to use this form:  /usr/bin/mail "$@"
> 
> "$@" (including the double quotes) expands to the list of parameters passed
> to the script, each one properly quoted. That is, it's the same as
> "$1" "$2" "$3" ... for as many parameters as the script has.

Sure.  Thanks for the pointer!

Chris




> _______________________________________________
> Condor-users mailing list
> To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/condor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/condor-users/

--
Dr Chris Jewell
Lecturer in Biostatistics
Institute of Fundamental Sciences
Massey University
Private Bag 11222
Palmerston North 4442
New Zealand
Tel: +64 (0) 6 350 5701 Extn: 3586