[Freeswitch-users] How do I execute shell command from Lua?

JP jaykris at gmail.com
Tue Feb 26 01:06:06 MSK 2013


I tried both with the same result.

-JP

On Mon, Feb 25, 2013 at 2:01 PM, Michael Collins <msc at freeswitch.org> wrote:

> Is it supposed to be f:read() or f.read() ?
> -MC
>
> On Mon, Feb 25, 2013 at 1:57 PM, JP <jaykris at gmail.com> wrote:
>
>> I entered this into my Lua script
>>
>> local f = io.popen("pwd") -- runs command
>> local o = f:read("*a") -- read output of command
>>
>> and executed the script from fs_cli. This only caused the fs_cli to
>> become unresponsive.
>>
>> Is there something I am doing wrong?
>>
>> Thanks
>> JP
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Michael S Collins
> Twitter: @mercutioviz
> http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130225/19ba2306/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list