Multiline shebang: Difference between revisions

Added PicoLisp
(Remove all missing-the-point "just use a plain shebang" examples; there's not enough to them to be worth keeping until fixed.)
(Added PicoLisp)
Line 41:
& eval 'exec /usr/bin/perl -wS $0 $argv:q'
if $running_under_some_shell;</lang>
 
=={{header|PicoLisp}}==
We can use a multi-line comment #{ ... }# to hide the shell commands from Lisp. The opening #{ in turn is a coment for the shell.
<lang PicoLisp>#!/bin/bash
#{
exec pil $0 foo bar
# }#
 
# Lisp code
(println (cadr (file)) (opt) (opt))
(bye)</lang>
Output:
<pre>$ ./myScript
"myScript" "foo" "bar"</pre>
 
=={{header|Ruby}}==
Anonymous user