Re: binfmt_script and ^M

From: Andries.Brouwer@cwi.nl
Date: Mon Mar 05 2001 - 16:15:44 EST


> And what does POSIX say about "#!/bin/sh\r" ?

Nothing at all. The #! construction is not part of any standard
right now. The implementation is messy - different operating systems
do vaguely similar things, but all details differ.
Linux can do whatever it wants.
Of course it helps portability if we stay close to what other OSs do.

There is some discussion at
  http://www.cwi.nl/~aeb/std/hashexclam-1.html
Additions and corrections welcome.

In this particular case I have no strong opinion,
but would not object to removing the '\r'.

The standard defines whitespace in the POSIX locale, as one or more
<blank>s (<space>s and <tab>s), <newline>s, <carriage-return>s,
<form-feed>s, and <vertical-tab>s.
Some systems strip the #! line for trailing whitespace, some don't.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 07 2001 - 21:00:17 EST