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
  • 776
  • 1
  • 9
  • 27

1 Answers1

2

Use simple string concatenation:

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