shebang

Linux shell strange situation

Does anyone know why the following script works? #a-random-junk-string echo HI The shell executes the echo command, and outputs HI. I thought that since there is no "!" after the "#", the shell would give an error. ...

When using Ajax History and Bookmark, is it always good to use "#!" instead of just "#"?

Facebook is doing Ajax History (Back and Forward button) and Bookmark using #! instead of just # in the URL. Is it always a good idea to do that, because I was thinking that a usual anchor could interfere with the Ajax History mechanism to trigger it into processing a normal anchor. So, the Ajax History function will only process a has...

Is there a standard way to make sure a python script will be interpreted by python2 and not python3?

Is there a standard way to make sure a python script will be interpreted by python2 and not python3? On my distro, I can use #!/usr/bin/env python2 as the shebang, but it seems not all distros ship "python2". I could explicitly call a specific version (eg. 2.6) of python, but that would rule out people who don't have that version. It se...

Shebang for psql

Hello I'm trying to write Postgresql script(s) but having a problem with shebang line #! /usr/bin/psql [ psql_args_here ] -f select now(); This gives me error as if I just entered psql without any arguments in command line. How do I do it right? Thanks. ...