Sorry for posting again this question, but I think there is something important to know and I can't figure out what.<br><br>I run a command printing simple text on default io device (stdout):<br>bash> erl -noshell -eval "lists:foreach(fun(N) -> io:format(\"~w~n\", [N]) end, lists:seq(1,5)), erlang:halt()."
<br>1<br>2<br>3<br>4<br>5<br><br>That's the behaviour I expected.<br>But if I try to pipe the result, erlang crash:<br>bash>
erl -noshell -eval "lists:foreach(fun(N) -> io:format(\"~w~n\", [N])
end, lists:seq(1,5)), erlang:halt()." | head -n 3
<br>1<br>2<br>3<br>Crash dump was written to: erl_crash.dump<br>init terminating in do_boot ()<br><br>What's happening?<br>Is it a normal behaviour?<br>