Multiline shebang: Difference between revisions

Content added Content deleted
(clarification)
(Added Clojure)
Line 6: Line 6:
The syntax for a multiline shebang is complicated. You need to simultaneously comment the shebangs away from the language and reveal them uncommented to Bash so that the shebangs can be executed.
The syntax for a multiline shebang is complicated. You need to simultaneously comment the shebangs away from the language and reveal them uncommented to Bash so that the shebangs can be executed.


=={{Common Lisp}}==
=={{header|Clojure}}==
The namespace = basename = filename minus the extension must be passed as a value to Clojure's -m flag.

<lang clojure>":";exec clj -m `basename $0 .clj` $0 ${1+"$@"}
":";exit</lang>

=={{header|Common Lisp}}==
Here, the script name is passed once to CLISP and once to ext:*args*, which normally omits it.
Here, the script name is passed once to CLISP and once to ext:*args*, which normally omits it.