[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pipe -> lua -> pipe ???
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 24 Oct 2014 12:19:18 -0500
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