in reply to How to remove "^M" in the files ?

\r\n is windows line ending, linux line ending is \n, \r shows as ^M in vi.

Replies are listed 'Best First'.
Re: Re: How to remove "^M" in the files ?
by hardburn (Abbot) on Feb 11, 2004 at 14:22 UTC

    No cookie for you. "\n" is the Unix line ending, which Linux-based systems just happen to follow. Also, the '^M' tends to be the common way of showing "\r" in most Unix applications, not just vi.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

      It *is* the linux line ending though. It's *also* the unix one, but that doesn't mean it's not the linux one. And yes, not just vi, laziness, etc.