Re: [exim] Quote problem with ${run}

Góra strony
Delete this message
Reply to this message
Autor: Graeme Fowler
Data:  
Dla: exim-users
Temat: Re: [exim] Quote problem with ${run}
On Wed, 2013-02-06 at 22:28 +0000, Stephan Helma wrote:
> The file .vacation.msg should call
>     /bin/date --date=2013-02-07 +"%A, %-d %B"
> to format a time string. Whatever I do, I get the this error from /bin/date:
>     bin/date: extra operand `%-d'
>     Try `/bin/date --help' for more information.


You need to do this (broken across two lines):

> ${run {'/bin/date' '--date=2013-02-07' \

'+"%A, %-d %B"'}{$value}{$value}}
"Thursday, 7 February"

(you may want to lose the double quotes in the format string).

As this is not called through a shell, the quoting is important. For a
bit more detail, have a read of:

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html

and search for ${run

Graeme