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 I end up with a file called date.txt with the contents: Mon Aug 29 18:32:45 EDT 2005

I would like to issue a command in my dialplan that puts the date into a new variable something like this:
System(echo | date > Set(newVariableName=theDateEchoReturns)

So that the newVariableName=Mon Aug 29 18:32:45 EDT 2005

The objective in this case is to format the date according to the Unix Time format listed above. I am certainly open to other options for doing this. The default ${TIMESTAMP} format doesn't work for my needs.

Thanks!


_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to