Mit-scheme - run the script and exit

I want to evaluate a script from a makefile and exit like this

mit-scheme --load "fact.scm" 

However, after he evaluates the file, he does not exit, and a replica appears; if I try the primitive (exit) , it asks for confirmation y / n. Can this be solved?

+5
mit-scheme
Jul 13 '14 at 6:23
source share
3 answers

For Unix, mit-schemes read input files using redirection:

mit-scheme < /usr/cph/foo.in > /usr/cph/foo.out 2>&1 &

This is taken from the documentation http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/Command_002dLine-Options.html#Command_002dLine-Options

+3
Jul 13 '14 at 17:57
source share

Just let our team automatically close the stdin of the mit-circuit process, for example.

 echo | mit-scheme --load sample.scm 

We can expand it to a script function; here is my unskilled implementation:

 function mschm () { IFS="" for arg in $@ do echo | mit-scheme --load $arg done } 
+3
Nov 29 '16 at
source share

You can add the --quiet argument to the mit-scheme command to suppress the default output. Otherwise, it will be a Charlie Forthmount function curve (although it only downloads one file):

 run-mit-scheme () { echo | mit-scheme --quiet --load $1; # Add an extra newline echo } 
+2
May 20 '17 at 3:34
source share



All Articles