I tried the following:
$ cat args.sh
\#! /Applications/ccl/dx86cl64
(format t "~&~S~&" *args*)
$ ./args.sh
Couldn’t load lisp heap image from ./args.sh
I can run lisp fine directly:
$ /Applications/ccl/dx86cl64
Welcome to Clozure Common Lisp Version 1.5-r13651 (DarwinX8664)!
?
Is it possible to write a shell script to run lisp code with Clozure CL? I am sure I am doing something silly.
I installed it from: http://openmcl.clozure.com/
Just following up on Charlie Martin’s answer and on your subsequent question. The
dx86cl64 --eval <code>will fire up a REPL, so if you want to fire up a given script then quit, just add this to the end of your script:(ccl::quit). In the example you provided, this would do the trick:A nicer script would be the following:
Put that into a file,
load-ccl-script.sh(or other name of your choice). Then the following interaction works: