Dump output from REPL

Posted by Ankit Soni on Super User See other posts from Super User or by Ankit Soni
Published on 2012-09-30T11:54:49Z Indexed on 2012/09/30 15:40 UTC
Read the original article Hit count: 380

Filed under:
|
|

I'm writing SML programs, and I'd like a way to quickly see the output from running a program in the REPL without actually running the REPL (to quickly see if a program has syntax errors - I plan to use this as a make program for .sml files in vim to view the output inside vim).. Currently, I have this:

sml file.sml | echo -e "\004"

So it runs the program, and then echoes Ctrl-D to exit the REPL. The problem is that its too quick to send the Ctrl-D key, so there is no output. I tried this too:

sml file.sml | sleep 2 ; echo -e "\004"

But that isn't doing it either. Any ideas on how I can get a dump of the output from the REPL?

© Super User or respective owner

Related posts about bash

Related posts about output