Last active
December 29, 2015 17:47
-
-
Save jasom/467cbb40667f96f75ae4 to your computer and use it in GitHub Desktop.
Alternative way of launching lisp scripts on *nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'eval' #| | |
exec sbcl --script "$0" "$@" | |
# |# | |
nil ;; this completes the quote from before the comment | |
(format t "Hello, ~A!~%" (or (second sb-ext:*posix-argv*) "world")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is completely portable so long as it contains only characters from the "C" locale, as posix mandates loading an executable file as a shell script if ENOEXEC is returned.
Advantages over shebang include: