[asterisk-users] Fwd: write system command output into a variable
Daniel Knoll
daniel at danielknoll.de
Sat Apr 16 10:55:11 CDT 2011
I found a solution that works fine for me
Set(var1=${SHELL(shellcommand)})
Bye Daniel
> Von: Daniel Knoll <daniel at danielknoll.de>
> Datum: 16. April 2011 13:13:28 MESZ
> An: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
> Betreff: write system command output into a variable
>
> Hey Guys,
>
> i would like to write the output from my bash script into a Variable, that is readable by Asterisk
>
> Using this:
> Set(var1=${FILE(/dev/shm/tempfile.txt,0,6)})
>
> is not very helpful because this command reading fixed character length. If i read 6 characters and in the file only 3 i get "123 "
> Can anyone help me ?
>
> Thanx a lot for help
>
> Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110416/a1036d06/attachment.htm>
More information about the asterisk-users
mailing list