Greg Wooledge wrote: > POSIX specifies the behavior of a shell. This tells Chet how he has to > make Bash behave (with some leeway). There are all kinds of silly little > details and ambiguities that Chet has to worry about. > > However, YOU as a shell script writer do not have to worry about all > that crap. All you have to do is put the proper shebang line in your > script, and then -- like magic! -- your script will be executed using > the interpreter you specified. --- Except it isn't a script -- it's input that came from the terminal, that got repetitively edited using vi mode, until it got saved in a file so it could continue to be edited, and stay on the screen while executing it in the original window.
I.e. it's the natural evolution of input you type into the terminal. How often, when at a terminal, do you type #!/bin/bash before every line? To have your script suddenly change behavior because you saved it in a file and executed it by name would probably surprise most people.