Ok, first lets clarify that its not called a poundbang but a "shebang".
This declares the location of the
interpreter for the language. Yes a simple echo can be run without one as if there is not one it will assume that /bin/sh should be used which is a sym link to whatever shell you are currently using(ksh, bash, etc..).
The importance of this becomes clear as you try to create more indepth scripts in other languages. Here's how to see this in action:
Put the following into a file and make it executable.
Code:
print "I will now count my chickens:"
print "Hens", 25 + 30 / 6
print "Roosters", 100 - 25 * 3 % 4
print "Now I will count the eggs:"
print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
print "Is it true that 3 + 2 < 5 - 7?"
print 3 + 2 < 5 - 7
print "What is 3 + 2?", 3 + 2
print "What is 5 - 7?", 5 - 7
print "Oh, that's why it's False."
print "How about some more."
print "Is it greater?", 5 > -2
print "Is it greater or equal?", 5 >= -2
print "Is it less or equal?", 5 <= -2
Now try and run the script, it will error as bash or ksh cannot interpret these commands. Now add a shebang to specify python as your interpeter:
And run the script and it will work.
NOTE: The above code was an excerpt take from
http://learnpythonthehardway.org/book/ex3.html for use as a quick educational example.