lua-users home
lua-l archive

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


Thanks

It worked! :)

chave=assert (io.popen('xmlstarlet sel -t -v "/account_out/authenticator" /var/lib/boinc-client/lookup_account.xml'))
        for line in chave:lines() do
                comando='boinccmd --project_attach http://'..host_servidor..'/'..projeto_boinc..' '..line
        end
        chave:close()
        os.execute(comando)
        print(comando)

Felipe

On Mon, Aug 27, 2012 at 4:06 PM, Petite Abeille <petite.abeille@gmail.com> wrote:

On Aug 27, 2012, at 8:38 PM, Felipe Oliveira Gutierrez <lipe.82@gmail.com> wrote:

>  key=os.execute('xmlstarlet sel -t -v "/account_out/authenticator"
> /var/lib/boinc-client/lookup_account.xml')

Try io.popen:

http://www.lua.org/manual/5.2/manual.html#pdf-io.popen

For example:

  local aCommand = ( '%s -x %s < %s' ):format( reformail, Quote( 'message-id:' ), Quote( aMailPath ) )
  local aHandle = assert( io.popen( aCommand , 'r' ) )
  local aHeader = aHandle:read( '*l' )






--
-- Felipe Oliveira Gutierrez
-- lipe.82@gmail.com
-- https://sites.google.com/site/lipe82/Home/diaadia