As pointed out, for a Scheme system that supports #!optional #!eof
#!null etc keywords we can't just define "#!" as a comment delimiter.
Kawa's solution is to define "#!/" as a 3-character comment delimiter
which skips to the end of the line. Kawa only treats "#!/" as a comment
at the beginning of a source file, but that may be difficult for
some implementations to check.
When you need to pass extra options you can use Kawa's
"--script2 FILENAME" which run the named file as a source file,
skipping the first two lines. This allows:
#!/bin/sh
exec kawa --various --options --script2 "$0" "$_at_"
(define (foo) ...)
(foo ...)
--
--Per Bothner
per_at_bothner.com http://per.bothner.com/
Received on Wed Nov 15 2006 - 12:17:15 UTC