Hi Axel,

> Understood. It is also somewhat surprising when a script doesn't get a
> chance to handle input, but you can't have everything :-)

No, the _input_ is always completely processed. The difference is just
what happens after EOF on standard input.

If standard input is from a TTY (assuming interactive use (REPL)), the
process terminates immediately upon EOF, while EOF on stdin from a
redirection or pipe allows the process to continue processing.


> So when making text-processing scripts I guess the workaround would be
> to read from /proc/self/fd/0 ?

Yes, this works, because /proc/self/fd/0 is not a TTY.

So the assumption is that a typical "script" will take data from some
file, pipe or redirection, and not from the REPL.

♪♫
- Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to