19
I know that in the begining of .sh bash scripts is
#!/bin/bash
which points to the command interpeter executable.
But during watching Google Python Class http://www.youtube.com/watch?v=tKTZoB2Vjuk I noticed that for python they use
#!/usr/bin/python -tt
. Surfing the Internet I also have found such styles of this notation:
#!/usr/local/bin/python
and even
#!/usr/bin/env python
.
So, I'm new with Python and I'm ordinary Linux user and I have a few questions about this "magic" line:
- First of all, what is the right form of this line? and why?
- What does -tt key means in #!/usr/bin/python -tt ?
- What program is parsing this line in Linux?
- What syntax of this line for any script?
- Why this line is so necessary if each file have it's extension?
- And what about that in each computer interpreter for some kind of scripts will be stored in different place than in another? And script couldn't be run.
It's really interesting to me. What's this line? Why this line? How to write this line? Why in such a way?...