|
|
|
|
|
by sudahtigabulan
503 days ago
|
|
Reminds me of how GNU Guile handles the one argument limitation - with "multi-line" shebang[1]. #!/usr/bin/guile \
-e main -s
!#
turns into /usr/bin/guile -e main -s filename
Wonder why they bothered.Probably env -S is a recent addition. Or not available on all platforms they cared about. [1]: https://www.gnu.org/software/guile/manual/html_node/The-Meta... |
|
- The second line is treated like a commend by the shell (and Tcl)
- The third line is executed by the shell to run Tcl with all the command line args. But then Tcl treats it as part of the second line (a comment).
Edit: Doing a bit of web searching (it's been a while since I last had the option to program in Tcl), this was also used to work around line length limitations in shebang. And also it let you exec Tcl from your path, rather than hard code it.