Passing arguments to os.execute()

Hello,

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.

Thanks

Posted at Nginx Forum: