in reply to (OT) Fixing Line Endings
Actually - why not a kernel hack? Just map "foo\r" -> "foo" in the exec codepath. You'll lose the ability to run scripts with an interpreter of such a name, but that seems a small loss.
<rummages> There's some string manipulation in linux/fs/binfmt_script.c to find and launch the shebang. Just add a:
just after the strcpy (interp, i_name); in the load_script function and Bob's your Auntie's live-in lover. Possibly.if(interp(strlen(interp)-1) == '\r') { interp(strlen(interp)-1) = '\0'; }
|
|---|