[exim] Quote problem with ${run}

Top Page
Delete this message
Reply to this message
Author: Stephan Helma
Date:  
To: exim-users
Subject: [exim] Quote problem with ${run}
I am writing a vacation transport rule on exim :

vacation_reply:
driver = autoreply
file = ${home}/.vacation.msg
file_expand
...

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 get this error, if you do not put the format string into quotes.


I tried the following versions:

WORKING, but no custom formatting:
    ${run {/bin/date --date=2013-02-07}{$value}{$value}}
WORKING, but only one format token:
    ${run {/bin/date --date=2013-02-07 +%A}{$value}{$value}}
NOT working
    ${run {/bin/date --date=2013-02-07 +"%A, %-d %B"}{$value}{$value}}
    ${run {/bin/date --date=2013-02-07 +\"%A, %-d %B\"}{$value}{$value}}
    ${run {/bin/date --date=2013-02-07 +${quote:%A, %-d %B}}{$value}{$value}}
    ${run {/bin/date --date=2013-02-07 +${quote:"%A, %-d %B"}}{$value}{$value}}


I could always call /bin/date three times as per second line, but - well
that is not very elegant...

Can anybody point me in the right direction?

Thanks.

Stephan