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

Top Pagina
Delete this message
Reply to this message
Auteur: Stephan Helma
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] Quote problem with ${run}
Argh, I forgot to mention the Exim version: 4.72-6+squeeze3 on Debian.

On 02/06/2013 10:28 PM, Stephan Helma wrote:
> 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