[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] MacOSX email
- Date: Thu, 4 Oct 2012 08:59:52 +0100
- From: Brian Candler <B.Candler@xxxxxxxxx>
- Subject: Re: [Condor-users] MacOSX email
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:
> cat - | /usr/bin/mail $1 "$2" $3
> exit 0
> 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.