given a text, is there a program that can detect what the new line character is, the Windows, Mac, or Linux one?
Eg, the following text is shown by less
memor:^M^Mis storage directly accessible by CPU^M^MThe term "memory" is often (but not always) associated with addressable semiconductor memory, i.e. integrated circuits consisting of silicon-based transistors.^MThe semiconductor memory i s organized into ^Mmemory cells
I thought ^M is the new line character under Mac. But in emacs, I searched by Ctrl-q Ctrl-m and found nothing.
Thanks.
file
command sould give a clue,dos2unix
might also help. – Archemar Oct 29 '14 at 05:47