[Asterisk-Users] Re: Execute command in shell

James H. Cloos Jr. cloos at jhcloos.com
Fri Feb 6 01:58:09 MST 2004


>>>>> "Marc" == Marc Fargas <asterisk at telenieko.com> writes:

Marc> I've seen its possible to use the System applications, but what
Marc> about passing arguments to the command ?

A quick look at app_system.c shows that it just passes the string
unaltered to system(3).  So, running "man 3 system" will show exactly
what system(3) does:

   system()  executes  a command specified in string by calling
   /bin/sh -c string, and returns after the command has been completed.

As such, System(command arg1 arg2 etc) should do what you want.

-JimC

PS   No, I didn't know that before I looked at the src....

PPS  Except for what was in the system(3) manpage....





More information about the asterisk-users mailing list