lua-users home
lua-l archive

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





On Fri, Dec 6, 2013 at 3:09 PM, Alexander Schulz <aiqpost@yahoo.com> wrote:
Hey,

i want to create a script with lua that reads from a pipe and allows to read input from the user terminal.

Example: history -n | tail -n 10 | my_script

In this case is io.stdin a file descriptor to the pipe.
How can i get now in lua a file descriptor on the current terminal?

Thanks,
Alexander

you could use lurlutil (https://github.com/d-led/lurlutil) -> lurlutil.getkey()