How to signal EOF to Erlang shell program on OSX and in general
11 views
Skip to first unread message
Rick O'Shea
unread,
Aug 13, 2017, 3:04:38 PM8/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Erlang Questions
Requirement: accumulate a list of strings until eof is detected on stdin. I am unable to generate an eof or enter a blank line using fread:
{ok, A} = io:fread("my kingdom for an eof or blank line: "~s")
Blank lines are echoed to the console but otherwise ignored. Neither Ctrl-D not Ctrl-Z achieves the desired result (intercepted by the Erlang shell itself).