[erlang-questions] How do I prevent escript from reading stdin?

José Valim jose.valim@REDACTED
Mon Jul 1 13:22:42 CEST 2019

IIRC you can pass the -noinput flag at the beginning of the escript:

#!/usr/bin/env escript
%%! -noinput

*José Valim*
Skype: jv.ptec
Founder and Director of R&D

On Mon, Jul 1, 2019 at 1:17 PM Roger Lipscombe <roger@REDACTED>

> If I paste a sequence of commands into my terminal window...
>      ./some-escript
>      ./not-escript
> ...then not-escript never gets run, because (afaict), some-escript ate
> all of the input. If I paste the following:
>      ./some-escript </dev/null
>      ./not-escript
> ...then it's fine. But that's ugly.
> How do I prevent escript from reading stdin?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190701/9123bc87/attachment.htm>

More information about the erlang-questions mailing list