On 22/04/2014 13:52, Chris Angelico wrote: > On Tue, Apr 22, 2014 at 10:36 PM, Steven D'Aprano > <steve+comp.lang.pyt...@pearwood.info> wrote: >>> These are the 15 first lines of the script: >>> >>> #! /opt/local/bin/python >> >> This being Solaris, what happens if you remove the space between the hash- >> bang and the path? On Linux it makes no difference, but Solaris tends to >> be a bit more idiosyncratic about things like this. > > I'm pretty sure the POSIX standard stipulates that a space there is > optional. Should be no difference between "#!/" and "#! /" on any > compliant OS. (But I can't right now find a citation for that, so I > may be wrong.) > > ChrisA >
man execve 4.3BSD implicitly mandates a space given its description of the shebang line, while POSIX simply implies the presence of a space. I have recently had to check this point. All current kernel implementations I cared to check would strip whitespace around the interpreter, although Solaris was not one such implementation. ~Andrew -- https://mail.python.org/mailman/listinfo/python-list