Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: (OT) Fixing Line Endings - patch the shell

by Fengor (Pilgrim)
on Nov 30, 2006 at 15:55 UTC ( [id://586978]=note: print w/replies, xml ) Need Help??


in reply to Re: (OT) Fixing Line Endings - patch the shell
in thread (OT) Fixing Line Endings

because that could possibly break every other program in the shell. It doesnt has to but the possibility exist and besides that unix just uses \n as line ending is a well known convetnion. you dont change that because some people transfer their files incorrectly ;)

--
"WHAT CAN THE HARVEST HOPE FOR IF NOT THE CARE OF THE REAPER MAN"
-- Terry Pratchett, "Reaper Man"

  • Comment on Re^2: (OT) Fixing Line Endings - patch the shell

Replies are listed 'Best First'.
Re^3: (OT) Fixing Line Endings - patch the shell
by imp (Priest) on Nov 30, 2006 at 16:13 UTC
    I haven't looked at the source to see what would be involved, but my uneducated guess would be that changing the shebang handler to ignore \r wouldn't be very complicated or risky.

    We all know that the proper line ending on a unix system is \n , but exploding because someone uploaded a file with a \r at the end of the shebang line isn't really the best approach in my opinion.

      Well thats the problem we are only guessing here. But the fact is if you would change the behaviour how a line ending is handled you are changing a critical piece of the system, one that interacts with a hell of a lot of other programs. You can never now or assure that every other program still works correctly after the change. You can guess and you can try to foretell what effects the change will have but the shere amount of scripts that get invoked via the shebang every day will most definitely assure that you cannot guarantee it. And as far as i am concerned i would rather not have it added to the standard code base.

      --
      "WHAT CAN THE HARVEST HOPE FOR IF NOT THE CARE OF THE REAPER MAN"
      -- Terry Pratchett, "Reaper Man"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://586978]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2024-04-19 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found