Asterisk SHELL command

I noticed a strage behaviour in a new installation

on extensions.conf i set:
exten => s,n,Set(it1_25=${SHELL(date +’%H%M%S’)})

Executing on CLI i get

Executing [s@poianaivr3:25] Set(“SIP/200-00000000”, "it1_25=142829
– ") in new stack

correct result but with a newline and a double –

someone can help me?

i need to put variables on a txt file but without newline and so on…


Return value
The output of the command

For single line output, you often will need to trim the last character, which may be a newline character. Depending on your script, if the script sends a newline, you will need to use something like:
${SHELL(echo 123):0:-1}