[Asterisk-Users] Re: echo system command and set the results to a new variable

Henry Junior henryjunior at gmail.com
Mon Aug 29 20:33:39 MST 2005


>> I am looking to issue a 'System cmd' that will echo the results into
>> a new variable -- can anyone tell me the correct way to do this?
>>
>> example: at the terminal I am currently able to issue this command:
>> echo | date > date.txt
>>
>
> Do you want to run that command in the shell? This pipes the output of
> 'echo' (with no parameters: just prints a single newline) to date  
> (with
> no params, ignores its input anyway

Sorry if this wasn't written clearly before.

I want to issue a System cmd in my dialpan that is similar to the  
unix echo command stated above. *EXCEPT* that I want to pipe the  
results into a *new* variable (vs a text file.)

Ideally, what would happen is in my diaplan I would issue the 'echo |  
date' command and pipe the output to a newly created variable with  
the appropriate output.

example:
NewVariable=Mon Aug 29 18:32:45 EDT 2005

Do you know how I can do this?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050829/2993ea80/attachment.htm


More information about the asterisk-users mailing list