4 ms·
I don't know enough of the matter to have an informed view, but I think it's worth noting that there is precedent for this sort of thing. Take from one of my Py
by scott_s 12y ago
I don't know enough of the matter to have an informed view, but I think it's worth noting that there is precedent for this sort of thing. Take from one of my Python scripts:
#!/usr/bin/env python
http://en.wikipedia.org/wiki/Shebang_%28Unix%29 http://en.wikipedia.org/wiki/Shebang_%28Unix%29
- bozoclownn 12y agoI would add that this technically is a (ba)sh script, not a Python script.
- tangent128 12y agoOn *nix systems, the #! is parsed by the kernel as a magic number. sh/bash are not involved.
- bozoclownn 12y agoThanks, didn't know!
- stefantalpalaru 12y agoNo, you can use any program to launch executable scripts that start with #!. The kernel sees that magic number at the beginning of the file, tries to read a program path and arguments, adds the script as the last arg and executes the whole thing. The various shells are just a subset of the possible programs used.