Anonymous user
Multiline shebang: Difference between revisions
add E
m (→{{header|Ruby}}: Keep ARGV[0] when doing exec "/bin/sh".) |
(add E) |
||
Line 20:
exit
|#</lang>
=={{header|E}}==
E uses only “#” for line comments, like the shell, so there is no straightforward answer. We can abuse the fact that “>” is also a line comment to achieve this effect. Note that a “>” line comment should ordinarily only occur as part of Updoc (test/documentation) text, so this is not good practice.
In this example, we are including the command name itself in the argument list, which would ordinarily not include it.
<lang e>#!/bin/sh
>/dev/null; exec rune $0 $0 ${1+"$@"}
println(`I was called as ${interp.getArgs()[0]}.`)</lang>
=={{header|Emacs Lisp}}==
|