[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Read user input from terminal when a pipe is used
- From: Thijs Schreijer <thijs@...>
- Date: Sat, 7 Dec 2013 10:22:58 +0000
just curious; is there a windows way of doing this?
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>schreef:
> 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?
local terminal = io.open("/dev/tty")