Re: binfmt_script and ^M

Ondrej Sury
2001-03-07T08:30:26Z

Sean Hunter <sean@dev.sportingbet.com> writes:

> I propose
> /proc/sys/kernel/im_too_lame_to_learn_how_to_use_the_most_basic_of_unix_tools_so_i_want_the_kernel_to_be_filled_with_crap_to_disguise_my_ineptitude

Well, too me it seems that you are intolerant.

I think that it should not be added to kernel because:

#!/bin/sh
/usr/bin/perl^M

will write
--
: No such file or directory
--
(in real it writes '/usr/bin/perl<CR>: No such file or directory')

But what I do think is that more meaningful message should be printed to
output, because it is not only ^M issue. You could mistype name of
interpreter and don't notice (/usr/bin/eprl or similar typos), and printing
message saying 'script.pl: file not found' is confusing.

I see problem somewhere else. There are editors and viewers (for example
midnight commander) which will hide ^M from you, and left you totally
confused (that's why I am using emacs ;-), because you have no idea why it
doesn't work, because everything seems ok with this _broken_ behaviour.
This is really BAD thing.

And even more BAD thing is the intolerance shown in this thread. People
are not morons just because they don't understand confusing message which
shell gives them. Behaviour of kernel is good, error message is wrong.
What should be fixed is error message.

--
Ondřej Surý <ondrej@globe.cz> Globe Internet s.r.o. http://globe.cz/
Tel: +420235365000 Fax: +420235365009 Pláničkova 1, 162 00 Praha 6
Mob: +420605204544 ICQ: 24944126 Mapa: http://globe.namape.cz/
GPG fingerprint: CC91 8F02 8CDE 911A 933F AE52 F4E6 6A7C C20D F273