shebang strange thing...

Dan Bishop danb_83 at
Tue Jun 24 01:29:44 CEST 2003

mwilson at (Mel Wilson) wrote in message news:<yKH9+ks/KvvV089yn at>...
> In article <uZSIa.534$sF6.54902840 at>,
> Van Gale <news at> wrote:
> >Erik Max Francis wrote:
> >> Van Gale wrote:
> >>>There's a very subtle bug (feature?) in bash (and maybe other shells?)
> >>>that will generate this error if the line is terminated with a CR/LF
> >>>pair instead of just a linefeed.
> >> Yes, it's common to other shells.  It's not a feature, but it's not a
> >> "bug" per se -- using CR LF terminated text files on Unix is operator
> >> error.
> >Well guess what, it happens.  It even happens when the "operator" is
> >aware of the problem.  So lets not call it a bug, and instead call it
> >poor programming because the error message is not only incorrect, but
> >will also waste a fair amount of time of someone trying to debug the
> >problem because it points them in the wrong direction.
>    It's understandable once you realize that the shell
> thinks the '\r' is part of the filename.  Just like
>     os.execv ('/usr/bin/python\r', ('',))

But how many people use \r at the end of filenames?  Or are even aware
that they can?

Even if it isn't a bug, it's a feature that causes more harm than

More information about the Python-list mailing list