Re: [exim] How to Remove new line or space (or how to escape…

Top Page
Delete this message
Reply to this message
Author: Marcin Mirosław
Date:  
To: exim-users
Subject: Re: [exim] How to Remove new line or space (or how to escape dkim selector)
W dniu 17.10.2013 18:09, Mike Cardwell pisze:
> * on the Thu, Oct 17, 2013 at 05:37:33PM +0200, Marcin Miros??aw wrote:
>
>> Thanks! I saw word "Perl" in description of ${sg} and I wrongly assumed
>> it launch perl engine.
>> I'd like to ask for help in one more thing. I've got problem with nested
>> braces:
>> $ exim -be '${sg{
>> {${readfile{/etc/exim/dkim/test2.test.com.pl.selector}} } {\n|\ }{} }}'
>> {131017}
>>
>> But I'm expecting to get only digits.
>> When I remove braces arround ${readfile I'm getting:
>> $ exim -be '${sg{
>> ${readfile{/etc/exim/dkim/test2.cadera.com.pl.selector}} {\n|\ }{} }}'
>> Failed: missing or misplaced { or }
>
> I first wrote out the ${sg} part:
>
> ${sg{}{}{}}
>
> I then added some newlines for readability:
>
> ${sg{
> }{
> }{
> }}
>
> I then added the arguments which we want to pass to ${sg}:
>
> ${sg{
>     ${readfile{/etc/exim/dkim/test2.cadera.com.pl.selector}}
> }{
>     \n|\ 
> }{

>
> }}
>
> I then compressed it down to a single line:
>
> ${sg{${readfile{/etc/exim/dkim/test2.cadera.com.pl.selector}}}{\n|\ }{}}
>
> It's almost the same as your second version apart from a semi-colon
> being out of place.

Hello!
Thank you Mike!
I've tried in similar way - added new line etc. But I did it wrong.
Thanks for describe good way to build such nested arguments.
Regards,
Marcin