> Off topic here, but was there ever a good reason for
> the differences between Mac/Unix/Dos newlines ?
DOS was originally created as a way of porting CP/M programs from 8080 and
Z80 machines. On the terminals & printers originally used with those
machines, CR acted as a carriage return, and would not move to the next line
unless a LF was also sent, while LF moved down a line without doing a
carriage return. So CP/M used CRLF as a line terminator. DOS inherited CRLF
to avoid breaking programs. I assume Unix uses \n because that char would do
the line feed + carriage return on whatever terminals were originally used
for its development but I'll leave further comment on Unix to people more
familiar with its history. And I don't know about the Mac at all.
>> (is this an old chestnut ?)
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!