Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


I would add that this technically is a (ba)sh script, not a Python script.


On *nix systems, the #! is parsed by the kernel as a magic number. sh/bash are not involved.


Thanks, didn't know!


No, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: