Previous: , Up: Running and Stopping SBCL   [Contents][Index]


1.2.1.2 SBCL as a Shell Script

Standard Unix tools that are interpreters follow a common command line protocol that is necessary to work with “shebang scripts”. SBCL supports this via the –script command line option.

#!/opt/local/bin/sbcl --script
(write-line "Hello, World!")
$ ./hello.lisp
Hello, World!
$ sbcl --script hello.lisp
Hello, World!