lua-users home
lua-l archive

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


Hi Theodor,

use io.popen(...)

-- Valentin.

On Wed, 15 Nov 2006, Theodor-Iulian Ciobanu wrote:

> Hello Lua,
> 
>   I'm always asking, but never giving to this community. I'm sorry about that, but hopefully I'll be fixing it very quickly. :) Until then, here's my question:
> 
> Is there an elegant way to intercept the output of external tools run using os.execute? The way I do it now is by redirecting the output to a text file ('dir >bla.txt' for example) then load it. (As a suggestion, I think something like
>  retcode, outstr = os.execute('dir')
> would be very nice.)
> 
> -- 
> Theodor-Iulian Ciobanu
> jr Virus Researcher
> 
> e-mail: tciobanu@bitdefender.com
> 
> -----------------------------------------
> Secure your every bit
> -----------------------------------------
> 
> 
> --
> This message was scanned for viruses by BitDefender for Linux Mail Servers.
> For more information please visit http://www.bitdefender.com/
> 
>