[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: binfmt_script and ^M
From: |
Jesse Pollard |
Subject: |
Re: binfmt_script and ^M |
Date: |
Mon, 5 Mar 2001 13:14:25 -0600 (CST) |
John Kodis <kodis@mail630.gsfc.nasa.gov>:
> On Mon, Mar 05, 2001 at 08:40:22AM -0500, Richard B. Johnson wrote:
>
> > Somebody must have missed the boat entirely. Unix does not, never
> > has, and never will end a text line with '\r'.
>
> Unix does not, never has, and never will end a text line with ' ' (a
> space character) or with \t (a tab character). Yet if I begin a shell
> script with '#!/bin/sh ' or '#!/bin/sh\t', the training white space is
> striped and /bin/sh gets exec'd. Since \r has no special significance
> to Unix, I'd expect it to be treated the same as any other whitespace
> character -- it should be striped, and /bin/sh should get exec'd.
Actually it does have some significance - it causes a return, then the
following text overwrites the current text. Granted, this is only used
occasionally for generating bold/underline/...
This is used in some formatters (troff) occasionally, though it tends to
use backspace now.
\r is not considered whitespace, though it should be possible to define
it that way. A line terminator is always \n.
Another point, is that the "#!/bin/sh" can have options added: it can be
"#!/bin/sh -vx" and the option -vx is passed to the shell. The space is
not just "stripped". It is used as a parameter separator. As such, the
"stripping" is only because the first parameter is separated from the
command by whitespace.
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil
Any opinions expressed are solely my own.
- Re: binfmt_script and ^M, (continued)
- Re: binfmt_script and ^M, Richard B. Johnson, 2001/03/05
- Re: binfmt_script and ^M, Richard B. Johnson, 2001/03/05
- Re: binfmt_script and ^M, Dr. Kelsey Hudson, 2001/03/05
- Re: binfmt_script and ^M, Peter Samuelson, 2001/03/06
- Re: binfmt_script and ^M, Dr. Kelsey Hudson, 2001/03/06
[PATCH]: print missing interpreter name [Was: Re: binfmt_script and ^M], Jan Nieuwenhuizen, 2001/03/05
Re: binfmt_script and ^M, Erik Hensema, 2001/03/05
Re: binfmt_script and ^M,
Jesse Pollard <=
Re: binfmt_script and ^M, Andries . Brouwer, 2001/03/05
Re: binfmt_script and ^M, Jesse Pollard, 2001/03/06
Re: binfmt_script and ^M, Jesse Pollard, 2001/03/06