I want to execute a sys.exe function with command line arguments . my code is
var1 = "myname"
var2 = "address"
function btn.write()
luci.sys.exec("/bin/register $var1 $var2")
end
This is wrong i know . How can i pass arguments to a sys.exe
function in Luci OpenWrt
? Any help ? Thanks .
Use simple string concatenation:
luci.sys.exec("/bin/register" .. $var1 .. " " .. $var2 .. " ")