[asterisk-users] write system command output into a variable

Daniel Knoll daniel at danielknoll.de
Sat Apr 16 06:13:28 CDT 2011


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


More information about the asterisk-users mailing list