Re: binfmt_script and ^M

2001-03-09 Thread Thorsten Glaser Geuer
- Original Message - From: "Sean Hunter" <[EMAIL PROTECTED]> To: "Thorsten Glaser Geuer" <[EMAIL PROTECTED]> Sent: Thursday, 8. March 2001 13:01 Subject: Re: binfmt_script and ^M > On Tue, Mar 06, 2001 at 09:10:26PM -, Thorsten Glaser Geue

Re: binfmt_script and ^M

2001-03-09 Thread Thorsten Glaser Geuer
- Original Message - From: "Sean Hunter" [EMAIL PROTECTED] To: "Thorsten Glaser Geuer" [EMAIL PROTECTED] Sent: Thursday, 8. March 2001 13:01 Subject: Re: binfmt_script and ^M On Tue, Mar 06, 2001 at 09:10:26PM -, Thorsten Glaser Geuer wrote: - Original M

Re: binfmt_script and ^M

2001-03-07 Thread Ondrej Sury
Sean Hunter <[EMAIL PROTECTED]> 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

Re: binfmt_script and ^M

2001-03-07 Thread Ondrej Sury
Sean Hunter [EMAIL PROTECTED] 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

Re: binfmt_script and ^M

2001-03-06 Thread Thorsten Glaser Geuer
- Original Message - From: "David Weinehall" <[EMAIL PROTECTED]> To: "Sean Hunter" <[EMAIL PROTECTED]>; "Laramie Leavitt" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, 6. March 2001 15:37 Subject: Re: binfmt_script and

Re: binfmt_script and ^M

2001-03-06 Thread Dr. Kelsey Hudson
On Tue, 6 Mar 2001, Peter Samuelson wrote: > [Dr. Kelsey Hudson] > > umm, last i checked a carriage return wasn't whitespace... space, > > horizontal tab, vertical tab, form feed constitute whitespace IIRC... > > Where and when did you check? Several sources disagree with you. a long while

Re: binfmt_script and ^M

2001-03-06 Thread Thorsten Glaser Geuer
- Original Message - From: "Jesse Pollard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Richard B. Johnson" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, 5. March 2001 19:14 Subject: Re: binfmt_script and

Re: binfmt_script and ^M

2001-03-06 Thread Andreas Schwab
John Kodis <[EMAIL PROTECTED]> writes: |> On Tue, Mar 06, 2001 at 11:36:29AM -0700, Jeff Coy wrote: |> |> > '#!/usr/bin/perl -w^M' works without any special handling; the link is |> > not needed: |> |> This is the main reason that I think that the kernel should treat \r |> as just another

Re: binfmt_script and ^M

2001-03-06 Thread John Kodis
On Tue, Mar 06, 2001 at 11:36:29AM -0700, Jeff Coy wrote: > '#!/usr/bin/perl -w^M' works without any special handling; the link is > not needed: This is the main reason that I think that the kernel should treat \r as just another whitespace character: it's what most shells do, it's what most

Re: binfmt_script and ^M

2001-03-06 Thread Jeff Coy
On Tue, 6 Mar 2001, Peter Samuelson wrote: > > [Jeff Coy] > > this issue came up frequently with customers uploading scripts in > > binary mode trying to run #!/usr/bin/perl^M. The solution for me was > > to just do the following: > > > > cd /usr/bin > > sudo ln -s perl^V^M perl > >

Re: binfmt_script and ^M

2001-03-06 Thread Peter Samuelson
[Dr. Kelsey Hudson] > umm, last i checked a carriage return wasn't whitespace... space, > horizontal tab, vertical tab, form feed constitute whitespace IIRC... Where and when did you check? Several sources disagree with you. Peter - To unsubscribe from this list: send the line "unsubscribe

Re: binfmt_script and ^M (historical note)

2001-03-06 Thread Don Dugger
Paul- Minor historical note. The `#!' processing was never done by the shell, this was always done in the kernel. Think about about it, the `#' character denotes a comment line, the shell ignores that line. `#!' was used to create a way for the kernel to execute a shell script directly.

Re: binfmt_script and ^M

2001-03-06 Thread Peter Samuelson
[Jeff Coy] > this issue came up frequently with customers uploading scripts in > binary mode trying to run #!/usr/bin/perl^M. The solution for me was > to just do the following: > > cd /usr/bin > sudo ln -s perl^V^M perl So none of your customers tried '#!/usr/bin/perl -w^M'?

Re: binfmt_script and ^M

2001-03-06 Thread Xavier Bestel
Wouldn't it be easier to run the script interpreter through WINE ? This way we could workaround several Win32 peculiarities, and users wouldn't bother taking special steps when coding on their home PC. Xav Le 06 Mar 2001 15:12:42 +, Sean Hunter a écrit : > > I propose >

Re: binfmt_script and ^M

2001-03-06 Thread Jesse Pollard
- Received message begins Here - > > Jesse Pollard <[EMAIL PROTECTED]> writes: > > |> Andreas Schwab <[EMAIL PROTECTED]>:Andreas Schwab <[EMAIL PROTECTED]>Andreas Schwab ><[EMAIL PROTECTED]> > |> > Paul Flinders <[EMAIL PROTECTED]> writes: > |> > > |> > |> Andreas Schwab

Re: binfmt_script and ^M

2001-03-06 Thread James A. Sutherland
On Tue, 6 Mar 2001, Sean Hunter wrote: > > 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 > > Any support? Hrm - make it part of the "fscking_moron" subsystem.

Re: binfmt_script and ^M

2001-03-06 Thread David Weinehall
On Tue, Mar 06, 2001 at 03:12:42PM +, Sean Hunter wrote: > > 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 > > Any support? Hey, let's go even further! Let's add support in

Re: binfmt_script and ^M

2001-03-06 Thread Sean Hunter
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 Any support? Sean On Tue, Mar 06, 2001 at 02:45:51PM -, Laramie Leavitt wrote: > > Andreas Schwab wrote: > > > Paul Flinders

Re: binfmt_script and ^M

2001-03-06 Thread Jeff Coy
On Mon, 5 Mar 2001, Robert Read wrote: > And isspace('\n') is also true. At question here is not the > definition of whitespace. The question is, what is the definition of > a command line? What characters are valid command line seperators? > It doesn't seem likely that '\r' is going to be

Re: binfmt_script and ^M

2001-03-06 Thread Andreas Schwab
Jesse Pollard <[EMAIL PROTECTED]> writes: |> Andreas Schwab <[EMAIL PROTECTED]>:Andreas Schwab <[EMAIL PROTECTED]>Andreas Schwab |<[EMAIL PROTECTED]> |> > Paul Flinders <[EMAIL PROTECTED]> writes: |> > |> > |> Andreas Schwab wrote: |> > |> |> > |> > This [isspace('\r') == 1] has no

RE: binfmt_script and ^M

2001-03-06 Thread Laramie Leavitt
> Andreas Schwab wrote: > > Paul Flinders <[EMAIL PROTECTED]> writes: > > |> Andreas Schwab wrote: > > |> > > |> > This [isspace('\r') == 1] has no significance here. The > right thing to > > |> > > |> > look at is $IFS, which does not contain \r by default. > The shell only splits > > |> > > |>

Re: binfmt_script and ^M

2001-03-06 Thread Jesse Pollard
Andreas Schwab <[EMAIL PROTECTED]>:Andreas Schwab <[EMAIL PROTECTED]>Andreas Schwab <[EMAIL PROTECTED]> > Paul Flinders <[EMAIL PROTECTED]> writes: > > |> Andreas Schwab wrote: > |> > |> > This [isspace('\r') == 1] has no significance here. The right thing to > |> > |> > look at is $IFS,

Re: binfmt_script and ^M

2001-03-06 Thread Paul Flinders
Andreas Schwab wrote: > Paul Flinders <[EMAIL PROTECTED]> writes: > > |> Andreas Schwab wrote: > |> > |> > This [isspace('\r') == 1] has no significance here. The right thing to > |> > |> > look at is $IFS, which does not contain \r by default. The shell only splits > |> > |> > words by "IFS

Re: binfmt_script and ^M

2001-03-06 Thread Pavel Machek
Hi! > > 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. However, it's not really intuitive to the user > getting

Re: binfmt_script and ^M

2001-03-06 Thread Andreas Schwab
Paul Flinders <[EMAIL PROTECTED]> writes: |> Andreas Schwab wrote: |> |> > This [isspace('\r') == 1] has no significance here. The right thing to |> |> > look at is $IFS, which does not contain \r by default. The shell only splits |> |> > words by "IFS whitespace", and the kernel should be

Re: binfmt_script and ^M

2001-03-06 Thread Andreas Schwab
Paul Flinders [EMAIL PROTECTED] writes: | Andreas Schwab wrote: | | This [isspace('\r') == 1] has no significance here. The right thing to | | look at is $IFS, which does not contain \r by default. The shell only splits | | words by "IFS whitespace", and the kernel should be consistent

Re: binfmt_script and ^M

2001-03-06 Thread Pavel Machek
Hi! 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. However, it's not really intuitive to the user getting a 'No

Re: binfmt_script and ^M

2001-03-06 Thread Paul Flinders
Andreas Schwab wrote: Paul Flinders [EMAIL PROTECTED] writes: | Andreas Schwab wrote: | | This [isspace('\r') == 1] has no significance here. The right thing to | | look at is $IFS, which does not contain \r by default. The shell only splits | | words by "IFS whitespace", and the

Re: binfmt_script and ^M

2001-03-06 Thread Jesse Pollard
Andreas Schwab [EMAIL PROTECTED]:Andreas Schwab [EMAIL PROTECTED]Andreas Schwab [EMAIL PROTECTED] Paul Flinders [EMAIL PROTECTED] writes: | Andreas Schwab wrote: | | This [isspace('\r') == 1] has no significance here. The right thing to | | look at is $IFS, which does not contain \r

RE: binfmt_script and ^M

2001-03-06 Thread Laramie Leavitt
Andreas Schwab wrote: Paul Flinders [EMAIL PROTECTED] writes: | Andreas Schwab wrote: | | This [isspace('\r') == 1] has no significance here. The right thing to | | look at is $IFS, which does not contain \r by default. The shell only splits | | words by "IFS whitespace",

Re: binfmt_script and ^M

2001-03-06 Thread Andreas Schwab
Jesse Pollard [EMAIL PROTECTED] writes: | Andreas Schwab [EMAIL PROTECTED]:Andreas Schwab [EMAIL PROTECTED]Andreas Schwab |[EMAIL PROTECTED] | Paul Flinders [EMAIL PROTECTED] writes: | | | Andreas Schwab wrote: | | | | This [isspace('\r') == 1] has no significance here. The right thing

Re: binfmt_script and ^M

2001-03-06 Thread Jeff Coy
On Mon, 5 Mar 2001, Robert Read wrote: And isspace('\n') is also true. At question here is not the definition of whitespace. The question is, what is the definition of a command line? What characters are valid command line seperators? It doesn't seem likely that '\r' is going to be

Re: binfmt_script and ^M

2001-03-06 Thread Sean Hunter
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 Any support? Sean On Tue, Mar 06, 2001 at 02:45:51PM -, Laramie Leavitt wrote: Andreas Schwab wrote: Paul Flinders [EMAIL

Re: binfmt_script and ^M

2001-03-06 Thread David Weinehall
On Tue, Mar 06, 2001 at 03:12:42PM +, Sean Hunter wrote: 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 Any support? sarcasm Hey, let's go even further! Let's add support in

Re: binfmt_script and ^M

2001-03-06 Thread James A. Sutherland
On Tue, 6 Mar 2001, Sean Hunter wrote: 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 Any support? Hrm - make it part of the "fscking_moron" subsystem.

Re: binfmt_script and ^M

2001-03-06 Thread Jesse Pollard
- Received message begins Here - Jesse Pollard [EMAIL PROTECTED] writes: | Andreas Schwab [EMAIL PROTECTED]:Andreas Schwab [EMAIL PROTECTED]Andreas Schwab [EMAIL PROTECTED] | Paul Flinders [EMAIL PROTECTED] writes: | | | Andreas Schwab wrote: | | [snip] | |

Re: binfmt_script and ^M

2001-03-06 Thread Xavier Bestel
Wouldn't it be easier to run the script interpreter through WINE ? This way we could workaround several Win32 peculiarities, and users wouldn't bother taking special steps when coding on their home PC. Xav Le 06 Mar 2001 15:12:42 +, Sean Hunter a crit : I propose

Re: binfmt_script and ^M

2001-03-06 Thread Peter Samuelson
[Jeff Coy] this issue came up frequently with customers uploading scripts in binary mode trying to run #!/usr/bin/perl^M. The solution for me was to just do the following: cd /usr/bin sudo ln -s perl^V^M perl So none of your customers tried '#!/usr/bin/perl -w^M'? (Come on,

Re: binfmt_script and ^M

2001-03-06 Thread Peter Samuelson
[Dr. Kelsey Hudson] umm, last i checked a carriage return wasn't whitespace... space, horizontal tab, vertical tab, form feed constitute whitespace IIRC... Where and when did you check? Several sources disagree with you. Peter - To unsubscribe from this list: send the line "unsubscribe

Re: binfmt_script and ^M (historical note)

2001-03-06 Thread Don Dugger
Paul- Minor historical note. The `#!' processing was never done by the shell, this was always done in the kernel. Think about about it, the `#' character denotes a comment line, the shell ignores that line. `#!' was used to create a way for the kernel to execute a shell script directly.

Re: binfmt_script and ^M

2001-03-06 Thread Jeff Coy
On Tue, 6 Mar 2001, Peter Samuelson wrote: [Jeff Coy] this issue came up frequently with customers uploading scripts in binary mode trying to run #!/usr/bin/perl^M. The solution for me was to just do the following: cd /usr/bin sudo ln -s perl^V^M perl So none of your

Re: binfmt_script and ^M

2001-03-06 Thread John Kodis
On Tue, Mar 06, 2001 at 11:36:29AM -0700, Jeff Coy wrote: '#!/usr/bin/perl -w^M' works without any special handling; the link is not needed: This is the main reason that I think that the kernel should treat \r as just another whitespace character: it's what most shells do, it's what most

Re: binfmt_script and ^M

2001-03-06 Thread Andreas Schwab
John Kodis [EMAIL PROTECTED] writes: | On Tue, Mar 06, 2001 at 11:36:29AM -0700, Jeff Coy wrote: | | '#!/usr/bin/perl -w^M' works without any special handling; the link is | not needed: | | This is the main reason that I think that the kernel should treat \r | as just another whitespace

Re: binfmt_script and ^M

2001-03-06 Thread Thorsten Glaser Geuer
- Original Message - From: "Jesse Pollard" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; "Richard B. Johnson" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, 5. March 2001 19:14 Subject: Re: binfmt_script and ^M John Kodis [EMAIL PROTECTED]:

Re: binfmt_script and ^M

2001-03-06 Thread Dr. Kelsey Hudson
On Tue, 6 Mar 2001, Peter Samuelson wrote: [Dr. Kelsey Hudson] umm, last i checked a carriage return wasn't whitespace... space, horizontal tab, vertical tab, form feed constitute whitespace IIRC... Where and when did you check? Several sources disagree with you. a long while ago... i

Re: binfmt_script and ^M

2001-03-06 Thread Thorsten Glaser Geuer
- Original Message - From: "David Weinehall" [EMAIL PROTECTED] To: "Sean Hunter" [EMAIL PROTECTED]; "Laramie Leavitt" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, 6. March 2001 15:37 Subject: Re: binfmt_script and ^M On Tue, Mar 06, 2001 at 03:12

Re: binfmt_script and ^M

2001-03-05 Thread Richard B. Johnson
On Mon, 5 Mar 2001, Robert Read wrote: > On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: > > > > And what does POSIX say about "#!/bin/sh\r" ? > > In other words: should the kernel look for the interpreter between the ! > > and the newline, or [the first space or newline] or the

Re: binfmt_script and ^M

2001-03-05 Thread Robert Read
On Mon, Mar 05, 2001 at 10:05:36PM +0100, Pozsar Balazs wrote: > On Mon, 5 Mar 2001, Robert Read wrote: > > On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: > > > > > > And what does POSIX say about "#!/bin/sh\r" ? > > > In other words: should the kernel look for the interpreter

Re: binfmt_script and ^M

2001-03-05 Thread Dr. Kelsey Hudson
On Mon, 5 Mar 2001, John Kodis wrote: > 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

Re: binfmt_script and ^M

2001-03-05 Thread Andries . Brouwer
> 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

Re: binfmt_script and ^M

2001-03-05 Thread Pozsar Balazs
On Mon, 5 Mar 2001, Robert Read wrote: > On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: > > > > And what does POSIX say about "#!/bin/sh\r" ? > > In other words: should the kernel look for the interpreter between the ! > > and the newline, or [the first space or newline] or the

Re: binfmt_script and ^M

2001-03-05 Thread Robert Read
On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: > > And what does POSIX say about "#!/bin/sh\r" ? > In other words: should the kernel look for the interpreter between the ! > and the newline, or [the first space or newline] or the first whitespace? > > IMHO, the first whitespace.

[PATCH #3]: print missing interpreter name [Was: Re: binfmt_script and ^M]

2001-03-05 Thread Jan Nieuwenhuizen
"Richard B. Johnson" <[EMAIL PROTECTED]> writes: > 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. Now, let's see. When this error happens, it can be one of

Re: binfmt_script and ^M

2001-03-05 Thread Paul Flinders
Paul Flinders wrote: > uses space (0x20) and tab (0x8) as white space and no other character. > I mean, of course, tab (_0x9_) I just checked - the kernel isspace() macro says that \r is whitespace. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: binfmt_script and ^M

2001-03-05 Thread Paul Flinders
Andreas Schwab wrote: > This [isspace('\r') == 1] has no significance here. The right thing to > look at is $IFS, which does not contain \r by default. The shell only splits > words by "IFS whitespace", and the kernel should be consistent with it: > > $ echo -e 'ls foo\r' | sh > ls: foo: No

Re: binfmt_script and ^M

2001-03-05 Thread Jesse Pollard
John Kodis <[EMAIL PROTECTED]>: > 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 ' '

Re: binfmt_script and ^M

2001-03-05 Thread Pozsar Balazs
On Mon, 5 Mar 2001, Paul Flinders wrote: > Jeff Mcadams wrote: > > > Also sprach Rik van Riel > > >On Mon, 5 Mar 2001, John Kodis wrote: > > >> 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 > > >> >

Re: binfmt_script and ^M

2001-03-05 Thread Andreas Schwab
Paul Flinders <[EMAIL PROTECTED]> writes: |> Jeff Mcadams wrote: |> |> > Also sprach Rik van Riel |> > >On Mon, 5 Mar 2001, John Kodis wrote: |> > >> 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

Re: binfmt_script and ^M

2001-03-05 Thread H. Peter Anvin
Followup to: <[EMAIL PROTECTED]> By author:"Richard B. Johnson" <[EMAIL PROTECTED]> In newsgroup: linux.dev.kernel > > The '\r' (^R) definitely has special significance to Unix. It's called > "VREPRINT", in the termios structure member "c_cc". > '\r' is ^M, not ^R. > There is really no

Re: binfmt_script and ^M

2001-03-05 Thread Erik Hensema
On Mon, Mar 05, 2001 at 08:40:22AM -0500, Richard B. Johnson wrote: > On 5 Mar 2001, Jan Nieuwenhuizen wrote: > > Pavel Machek <[EMAIL PROTECTED]> writes: > > > > $ head -1 testscript > > > > #!/bin/sh > > > > $ ./testscript bash: ./testscript: No such file or directory > > > What kernel wants

Re: binfmt_script and ^M

2001-03-05 Thread Paul Flinders
Jeff Mcadams wrote: > Also sprach Rik van Riel > >On Mon, 5 Mar 2001, John Kodis wrote: > >> 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'. > > >>

Re: binfmt_script and ^M

2001-03-05 Thread Jeff Mcadams
Also sprach Rik van Riel >On Mon, 5 Mar 2001, John Kodis wrote: >> 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

Re: [PATCH]: print missing interpreter name [Was: Re: binfmt_script and ^M]

2001-03-05 Thread Richard B. Johnson
On 5 Mar 2001, Jan Nieuwenhuizen wrote: > "Richard B. Johnson" <[EMAIL PROTECTED]> 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

Re: binfmt_script and ^M

2001-03-05 Thread Richard B. Johnson
On Mon, 5 Mar 2001, John Kodis wrote: > 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

Re: binfmt_script and ^M

2001-03-05 Thread Rik van Riel
On Mon, 5 Mar 2001, John Kodis wrote: > 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

Re: binfmt_script and ^M

2001-03-05 Thread John Kodis
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

Re: binfmt_script and ^M

2001-03-05 Thread Andreas Schwab
Jan Nieuwenhuizen <[EMAIL PROTECTED]> writes: |> Pavel Machek <[EMAIL PROTECTED]> writes: |> |> > > $ head -1 testscript |> > > #!/bin/sh |> > > $ ./testscript |> > > bash: ./testscript: No such file or directory ^ |> > |> > What kernel wants

Re: binfmt_script and ^M

2001-03-05 Thread Richard B. Johnson
On 5 Mar 2001, Jan Nieuwenhuizen wrote: > Pavel Machek <[EMAIL PROTECTED]> writes: > > > > $ head -1 testscript > > > #!/bin/sh > > > $ ./testscript > > > bash: ./testscript: No such file or directory > > > > What kernel wants to say is "/usr/bin/perl\r: no such file". Saying ENOEXEC > > would

Re: binfmt_script and ^M

2001-03-05 Thread Jan Nieuwenhuizen
Pavel Machek <[EMAIL PROTECTED]> writes: > > $ head -1 testscript > > #!/bin/sh > > $ ./testscript > > bash: ./testscript: No such file or directory > > What kernel wants to say is "/usr/bin/perl\r: no such file". Saying ENOEXEC > would be even more confusing. So, why don't we make bash say

Re: binfmt_script and ^M

2001-03-05 Thread Jan Nieuwenhuizen
Pavel Machek [EMAIL PROTECTED] writes: $ head -1 testscript #!/bin/sh $ ./testscript bash: ./testscript: No such file or directory What kernel wants to say is "/usr/bin/perl\r: no such file". Saying ENOEXEC would be even more confusing. So, why don't we make bash say that, then? As

Re: binfmt_script and ^M

2001-03-05 Thread Andreas Schwab
Jan Nieuwenhuizen [EMAIL PROTECTED] writes: | Pavel Machek [EMAIL PROTECTED] writes: | | $ head -1 testscript | #!/bin/sh | $ ./testscript | bash: ./testscript: No such file or directory ^ | | What kernel wants to say is

Re: binfmt_script and ^M

2001-03-05 Thread Richard B. Johnson
On 5 Mar 2001, Jan Nieuwenhuizen wrote: Pavel Machek [EMAIL PROTECTED] writes: $ head -1 testscript #!/bin/sh $ ./testscript bash: ./testscript: No such file or directory What kernel wants to say is "/usr/bin/perl\r: no such file". Saying ENOEXEC would be even more

Re: binfmt_script and ^M

2001-03-05 Thread John Kodis
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

Re: binfmt_script and ^M

2001-03-05 Thread Rik van Riel
On Mon, 5 Mar 2001, John Kodis wrote: 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

Re: binfmt_script and ^M

2001-03-05 Thread Richard B. Johnson
On Mon, 5 Mar 2001, John Kodis wrote: 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 ' '

Re: [PATCH]: print missing interpreter name [Was: Re: binfmt_script and ^M]

2001-03-05 Thread Richard B. Johnson
On 5 Mar 2001, Jan Nieuwenhuizen wrote: "Richard B. Johnson" [EMAIL PROTECTED] 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

Re: binfmt_script and ^M

2001-03-05 Thread Jeff Mcadams
Also sprach Rik van Riel On Mon, 5 Mar 2001, John Kodis wrote: 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

Re: binfmt_script and ^M

2001-03-05 Thread Paul Flinders
Jeff Mcadams wrote: Also sprach Rik van Riel On Mon, 5 Mar 2001, John Kodis wrote: 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,

Re: binfmt_script and ^M

2001-03-05 Thread Erik Hensema
On Mon, Mar 05, 2001 at 08:40:22AM -0500, Richard B. Johnson wrote: On 5 Mar 2001, Jan Nieuwenhuizen wrote: Pavel Machek [EMAIL PROTECTED] writes: $ head -1 testscript #!/bin/sh $ ./testscript bash: ./testscript: No such file or directory What kernel wants to say is

Re: binfmt_script and ^M

2001-03-05 Thread H. Peter Anvin
Followup to: [EMAIL PROTECTED] By author:"Richard B. Johnson" [EMAIL PROTECTED] In newsgroup: linux.dev.kernel The '\r' (^R) definitely has special significance to Unix. It's called "VREPRINT", in the termios structure member "c_cc". '\r' is ^M, not ^R. There is really no such thing

Re: binfmt_script and ^M

2001-03-05 Thread Pozsar Balazs
On Mon, 5 Mar 2001, Paul Flinders wrote: Jeff Mcadams wrote: Also sprach Rik van Riel On Mon, 5 Mar 2001, John Kodis wrote: 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

Re: binfmt_script and ^M

2001-03-05 Thread Paul Flinders
Andreas Schwab wrote: This [isspace('\r') == 1] has no significance here. The right thing to look at is $IFS, which does not contain \r by default. The shell only splits words by "IFS whitespace", and the kernel should be consistent with it: $ echo -e 'ls foo\r' | sh ls: foo: No such

Re: binfmt_script and ^M

2001-03-05 Thread Paul Flinders
Paul Flinders wrote: uses space (0x20) and tab (0x8) as white space and no other character. sigh I mean, of course, tab (_0x9_) I just checked - the kernel isspace() macro says that \r is whitespace. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

[PATCH #3]: print missing interpreter name [Was: Re: binfmt_script and ^M]

2001-03-05 Thread Jan Nieuwenhuizen
"Richard B. Johnson" [EMAIL PROTECTED] writes: 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. Now, let's see. When this error happens, it can be one of these:

Re: binfmt_script and ^M

2001-03-05 Thread Robert Read
On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: And what does POSIX say about "#!/bin/sh\r" ? In other words: should the kernel look for the interpreter between the ! and the newline, or [the first space or newline] or the first whitespace? IMHO, the first whitespace. Which

Re: binfmt_script and ^M

2001-03-05 Thread Pozsar Balazs
On Mon, 5 Mar 2001, Robert Read wrote: On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: And what does POSIX say about "#!/bin/sh\r" ? In other words: should the kernel look for the interpreter between the ! and the newline, or [the first space or newline] or the first

Re: binfmt_script and ^M

2001-03-05 Thread Andries . Brouwer
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

Re: binfmt_script and ^M

2001-03-05 Thread Dr. Kelsey Hudson
On Mon, 5 Mar 2001, John Kodis wrote: 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 ' '

Re: binfmt_script and ^M

2001-03-05 Thread Robert Read
On Mon, Mar 05, 2001 at 10:05:36PM +0100, Pozsar Balazs wrote: On Mon, 5 Mar 2001, Robert Read wrote: On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: And what does POSIX say about "#!/bin/sh\r" ? In other words: should the kernel look for the interpreter between the !

Re: binfmt_script and ^M

2001-03-02 Thread Pavel Machek
Hi! > > > When running a script (perl in this case) that has DOS-style > > > newlines (\r\n), Linux 2.4.2 can't find an interpreter because it > > > doesn't recognize the \r. The following patch should fix this > > > (untested). > > > Fix the script. The kernel expects a specific format > >

Re: binfmt_script and ^M

2001-03-02 Thread Pavel Machek
Hi! When running a script (perl in this case) that has DOS-style newlines (\r\n), Linux 2.4.2 can't find an interpreter because it doesn't recognize the \r. The following patch should fix this (untested). Fix the script. The kernel expects a specific format How about

Re: binfmt_script and ^M

2001-02-28 Thread H. Peter Anvin
Followup to: <[EMAIL PROTECTED]> By author:Jamie Lokier <[EMAIL PROTECTED]> In newsgroup: linux.dev.kernel > > David wrote: > > We wouldn't make the kernel translate m$ word docs into files the kernel > > can parse. It's a userland thing and changing the kernel would change a > > legacy

Re: binfmt_script and ^M

2001-02-28 Thread Erik Hensema
On Tue, Feb 27, 2001 at 01:44:08PM +, Alan Cox wrote: > > When running a script (perl in this case) that has DOS-style > > newlines (\r\n), Linux 2.4.2 can't find an interpreter because it > > doesn't recognize the \r. The following patch should fix this > > (untested). > Fix the script.

Re: binfmt_script and ^M

2001-02-28 Thread Jamie Lokier
David wrote: > We wouldn't make the kernel translate m$ word docs into files the kernel > can parse. It's a userland thing and changing the kernel would change a > legacy that would cause a lot of confusion I would expect. Now there's a thought. binfmt_fileextension, chooses the interpreter

Re: binfmt_script and ^M

2001-02-28 Thread Jamie Lokier
David wrote: We wouldn't make the kernel translate m$ word docs into files the kernel can parse. It's a userland thing and changing the kernel would change a legacy that would cause a lot of confusion I would expect. Now there's a thought. binfmt_fileextension, chooses the interpreter

Re: binfmt_script and ^M

2001-02-28 Thread Erik Hensema
On Tue, Feb 27, 2001 at 01:44:08PM +, Alan Cox wrote: When running a script (perl in this case) that has DOS-style newlines (\r\n), Linux 2.4.2 can't find an interpreter because it doesn't recognize the \r. The following patch should fix this (untested). Fix the script. The kernel

Re: binfmt_script and ^M

2001-02-28 Thread H. Peter Anvin
Followup to: [EMAIL PROTECTED] By author:Jamie Lokier [EMAIL PROTECTED] In newsgroup: linux.dev.kernel David wrote: We wouldn't make the kernel translate m$ word docs into files the kernel can parse. It's a userland thing and changing the kernel would change a legacy that would

Re: binfmt_script and ^M

2001-02-27 Thread David
Alistair Riddell wrote: > On Tue, 27 Feb 2001, Heusden, Folkert van wrote: > >> But; it's not that much of hassle to run it trough some awk/sed/whatsoever >> script, would it? Imho there should be as less as possible code in the > > > man fromdos (on most linux systems anyway) > tr -d '\r'

Re: [OT] Re: binfmt_script and ^M

2001-02-27 Thread Jamie Lokier
Tim Waugh wrote: > > Isn't `perl' overkill? Why not just: > > > > tr -d '\r' > > while read line; do echo ${line%?}; done And those can be convert a set of files as "fromdos *.c" can they? :-) -- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

[OT] Re: binfmt_script and ^M

2001-02-27 Thread Tim Waugh
On Tue, Feb 27, 2001 at 12:59:48PM -0700, Don Dugger wrote: > Isn't `perl' overkill? Why not just: > > tr -d '\r' while read line; do echo ${line%?}; done - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More

  1   2   >