lua-users home
lua-l archive

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


Javier Guerra Giraldez <javier@guerrag.com> [14-10-24 19:20]:
> On Fri, Oct 24, 2014 at 11:51 AM,  <meino.cramer@gmx.de> wrote:
> > How can I implement this "read from stdin and write to stdout"-thingy
> > without using files (I dont want to use the flash due to the wear-out
> > problems) ?
> 
> 
> io.read() and io.write() default to stdin and stdout, respectively.
> there's also io.stdin, io.stdout and io.stderr, which are file objects
> already open, you can read/write there.
> 
> finally, in Linux you can open /dev/stdin and /dev/stdout and you get
> a new handle to stdin and stderr, handy to use with any program that
> gets a filename.
> 
> -- 
> Javier
> 

Hi Javier,

thanks a lot for your help!
I am still a beginner to lua...

Best regards,
mcc