Welcome! Log In Create A New Profile


Passing arguments to os.execute()

June 19, 2014 02:57AM

How to send the value of a variable to a shell program using os.execute()?

I want to send the value of $uri to my shell program. Below is my code,

location / {

set_by_lua $result 'os.execute("/tmp/test.sh $uri")';


If I access $1 in my program, the value is just 'uri' not the value of the '$uri'.

Can please anyone tell me how to do this correctly.

Subject Author Posted

Passing arguments to os.execute()

tsunny June 19, 2014 02:57AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready