2

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 .

user2986042
  • 1,098
  • 2
  • 16
  • 37

1 Answers1

2

Use simple string concatenation:

luci.sys.exec("/bin/register" .. $var1 .. " " .. $var2 .. " ")
HenryGiraldo
  • 415
  • 3
  • 15