linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: Pavel Machek <pavel@suse.cz>,
	Erik Hensema <erik@hensema.xs4all.nl>,
	linux-kernel@vger.kernel.org, bug-bash@gnu.org
Subject: Re: [PATCH]: print missing interpreter name [Was: Re: binfmt_script and ^M]
Date: Mon, 5 Mar 2001 10:59:48 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.3.95.1010305105132.9913B-100000@chaos.analogic.com> (raw)
In-Reply-To: <m3vgpo462x.fsf@appel.lilypond.org>

On 5 Mar 2001, Jan Nieuwenhuizen wrote:

> "Richard B. Johnson" <root@chaos.analogic.com> writes:
> 
> > So why would you even consider breaking bash as a work-around for
> > a broken script?
> 
> I don't.
> 
> > Somebody must have missed the boat entirely. Unix does not, never
> > has, and never will end a text line with '\r'. It's Microsoft junk
> > that does that, a throwback to CP/M, a throwback to MDS/200.
> 
> Yes, we all know that, but you missed the point.  As far as this patch
> goes, it's got nothing to do with the '\r'.  It's meant to get a more
> informative error message from bash, if ``#!INTERPRETER'' does not
> exist.  Look:
> 
>     $ cat /bin/foo.sh
>     #!/foo/bar/baz
>     echo bar
>     $ /bin/bash -c /bin/foo.sh 
>     /bin/bash: /bin/foo.sh: No such file or directory
>     $ ./build/bash -c /bin/foo.sh 
>     ./build/bash: /foo/bar: No such file or directory
> 
> Maybe the message could even be better, but having `/foo/bar' printed,
> ie, the file that the kernel says does not exist, iso `/bin/foo.sh',
> the name of the script, that certainly does exist, may help.  Possibly
> both should be printed.
> 
> Greetings,
> Jan.

No. I did not miss the point. The 'No such file or directory' error
(when you can see the ^$^$)#@@*& filename with 'ls'), usually means
that there is something wrong with the file. Usually, I have found
that it was an executable linked against some other runtime library
than what I have. `strace` finds this quickly.

A common problem after a so-called upgrade. So, the bash error output
(without additional text) is consistent when there is something wrong with
the file-name as well. 

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.



  reply	other threads:[~2001-03-05 16:01 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27 13:03 binfmt_script and ^M 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-07  8:29                               ` Ondrej Sury
2001-03-06 16:59                             ` Xavier Bestel
2001-03-06 18:17                           ` binfmt_script and ^M (historical note) Don Dugger
2001-03-05 18:58                   ` binfmt_script and ^M 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 14:56           ` [PATCH]: print missing interpreter name [Was: Re: binfmt_script and ^M] Jan Nieuwenhuizen
2001-03-05 15:59             ` Richard B. Johnson [this message]
2001-03-05 20:18               ` [PATCH #3]: " Jan Nieuwenhuizen
2001-03-05 16:37           ` binfmt_script and ^M 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=Pine.LNX.3.95.1010305105132.9913B-100000@chaos.analogic.com \
    --to=root@chaos.analogic.com \
    --cc=bug-bash@gnu.org \
    --cc=erik@hensema.xs4all.nl \
    --cc=janneke@gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).