lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi everyone

I am trying to execute this command to get the return and put it at some variable. But my script shows the result on the screen and the variable didn't get the value:

I execute this:
$ lua programaSGABoinc.lua project_attach
Programa SGA Boinc em Lua
c5fbb29ac6e436e9e025427f8d7e8790
0
boinccmd --project_attach http://192.168.149.18/boinc_project 0
$

On my file programaSGABoinc.lua I have this:
if op == "project_attach" then
  key=os.execute('xmlstarlet sel -t -v "/account_out/authenticator" /var/lib/boinc-client/lookup_account.xml')
  print(key)
  comando='boinccmd --project_attach http://'..host_servidor..'/'..projeto_boinc..' '..key
  print(comando)
end

Does anyone know how to solve this?
Thanks
Felipe
--
-- Felipe Oliveira Gutierrez
-- lipe.82@gmail.com
-- https://sites.google.com/site/lipe82/Home/diaadia