lua-users home
lua-l archive

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

Rather, make 'os.execute()' return also the stdout.

I've enhanced it thus:
	rc_int [,stdout_txt ,stderr_txt]= os.execute( cmd_str [,catch_int=0] )

So this works:
_,machine_type= os.execute( "uname", 2 ) -- catches stdout, leaves stderr

This can be done either by 'popen' or using temporary files.
But it belongs to an 'extra' (perhaps etc?) since it's definately not ANSI C stuff.

:)	-ak

3.9.2004 kello 10:22, Dmitry Samersoff kirjoitti:

 Hi All,

How about to add function like
uname to main system library ?

Dmitry Samersoff,
ICQ: 3161705
* There will come soft rains ...