public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Thorsten Glaser Geuer" <eccesys@topmail.de>
To: "Jesse Pollard" <pollard@tomcat.admin.navo.hpc.mil>,
	<kodis@mail630.gsfc.nasa.gov>,
	"Richard B. Johnson" <root@chaos.analogic.com>
Cc: <linux-kernel@vger.kernel.org>, <bug-bash@gnu.org>
Subject: Re: binfmt_script and ^M
Date: Tue, 6 Mar 2001 20:54:16 -0000	[thread overview]
Message-ID: <01b201c0a680$7adb7000$de00a8c0@homeip.net> (raw)
In-Reply-To: <200103051914.NAA63254@tomcat.admin.navo.hpc.mil>

----- Original Message ----- 
From: "Jesse Pollard" <pollard@tomcat.admin.navo.hpc.mil>
To: <kodis@mail630.gsfc.nasa.gov>; "Richard B. Johnson" <root@chaos.analogic.com>
Cc: <linux-kernel@vger.kernel.org>; <bug-bash@gnu.org>
Sent: Monday, 5. March 2001 19:14
Subject: Re: binfmt_script and ^M


> 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.

Less supports it, but ^H is quite more oftenly used.
ISO_646.irv:1991 aka ISO-IR-6 aka US-ASCII-7 _also_ defines
it, and we're going to be not ASCII-compatible any longer if we
aren't going to support CRLF line endings.
I also oftenly have the other problem round: LF endings in files which
are to be viewed under DOS. I use a 15-year-old text editor from
Digital Research (yes, DOS 3.41) which still is fine under W** and
DOSEMU, it looks like jstar only that I miss find and replace.
IMHO those problems could be solved with programmes/kernels/libs
accepting LF as line ending and CRLF (and possibly CRCRLF ...)
as a synonyme for LF, but treat CR non-LF differently. I have seen
this behaviour quite often in the past and am using it for myself, too
(except for native assembly progs).

> \r is not considered whitespace, though it should be possible to define
> it that way. A line terminator is always \n.
ACK

> 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.

That's why I suggest treating CRLF (and only CR only-LF) as LF.

-mirabilos



  reply	other threads:[~2001-03-06 21:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-05 19:14 binfmt_script and ^M Jesse Pollard
2001-03-06 20:54 ` Thorsten Glaser Geuer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-06 15:56 Jesse Pollard
2001-03-06 13:55 Jesse Pollard
2001-03-06 14:54 ` Andreas Schwab
2001-03-05 21:15 Andries.Brouwer
2001-02-27 13:53 Heusden, Folkert van
2001-02-27 14:26 ` Alistair Riddell
2001-02-27 23:22   ` David
2001-02-28 14:07     ` Jamie Lokier
2001-02-28 22:23       ` H. Peter Anvin
2001-02-27 13:42 Heusden, Folkert van
2001-02-27 13:38 ` Ivo Timmermans
2001-02-27 14:01   ` Bruce Harada
2001-02-27 19:20   ` Jamie Lokier
2001-02-27 19:59     ` Don Dugger
2001-02-27 21:35   ` Rogier Wolff
2001-02-27 13:03 Ivo Timmermans
2001-02-27 13:44 ` Alan Cox
2001-02-27 13:47   ` Ivo Timmermans
2001-02-27 13:54     ` Alan Cox
2001-02-27 14:36       ` Rogier Wolff
2001-02-28 20:10   ` Erik Hensema
2001-03-01 12:04     ` Pavel Machek
2001-03-05 13:20       ` Jan Nieuwenhuizen
2001-03-05 13:37         ` Andreas Schwab
2001-03-05 13:40         ` Richard B. Johnson
2001-03-05 14:55           ` John Kodis
2001-03-05 15:25             ` Rik van Riel
2001-03-05 15:59               ` Jeff Mcadams
2001-03-05 16:18                 ` Paul Flinders
2001-03-05 17:12                   ` Andreas Schwab
2001-03-05 19:54                     ` Paul Flinders
2001-03-05 20:09                       ` Paul Flinders
2001-03-06 10:41                       ` Andreas Schwab
2001-03-06 12:33                         ` Paul Flinders
2001-03-06 14:45                           ` Laramie Leavitt
2001-03-06 15:12                             ` Sean Hunter
2001-03-06 15:37                               ` David Weinehall
2001-03-06 21:10                                 ` Thorsten Glaser Geuer
     [not found]                                   ` <20010308130145.O20737@dev.sportingbet.com>
2001-03-09 16:52                                     ` Thorsten Glaser Geuer
2001-03-06 15:53                               ` James A. Sutherland
2001-03-06 16:59                               ` Xavier Bestel
2001-03-07  8:29                               ` Ondrej Sury
2001-03-05 18:58                   ` Pozsar Balazs
2001-03-05 20:39                     ` Robert Read
2001-03-05 21:05                       ` Pozsar Balazs
2001-03-05 22:34                         ` Robert Read
2001-03-06 15:14                           ` Jeff Coy
2001-03-06 18:15                             ` Peter Samuelson
2001-03-06 18:36                               ` Jeff Coy
2001-03-06 20:26                                 ` John Kodis
2001-03-06 20:43                                   ` Andreas Schwab
2001-03-06  2:18                       ` Richard B. Johnson
2001-03-05 15:50             ` Richard B. Johnson
2001-03-05 16:53               ` H. Peter Anvin
2001-03-05 21:48             ` Dr. Kelsey Hudson
2001-03-06 18:19               ` Peter Samuelson
2001-03-06 21:04                 ` Dr. Kelsey Hudson
2001-03-05 16:37           ` Erik Hensema
2001-03-05 22:13             ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01b201c0a680$7adb7000$de00a8c0@homeip.net' \
    --to=eccesys@topmail.de \
    --cc=bug-bash@gnu.org \
    --cc=kodis@mail630.gsfc.nasa.gov \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pollard@tomcat.admin.navo.hpc.mil \
    --cc=root@chaos.analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox