Previous: Running from Emacs, Up: Starting SBCL


3.1.3 Shebang Scripts

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.

Example file (hello.lisp):

     #!/usr/local/bin/sbcl --script
     (write-line "Hello, World!")

Usage examples:

     $ ./hello.lisp
     Hello, World!
     $ sbcl --script hello.lisp
     Hello, World!