FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

LinkBack Thread Tools
Old 06-20-2008, 02:22 PM
Ron Johnson
Default text file from Linux to windows.

Hash: SHA1

On 05/29/08 20:28, Miles Fidelman wrote:
> Ron Johnson wrote:
>> On 05/29/08 19:35, Paul Johnson wrote:
>>> On Thursday 29 May 2008 05:26:43 pm L.V.Gandhi wrote:
>>>> I have made a text file in Linux using echo and cat commands. When I
>>>> open the file in note pad, I find files are not having line break, but
>>>> having a character in place of line break. Is there any way in echo
>>>> and cat commands usage to put windows line break?
>>> Windows happens to end lines in a way that's gratuitously different
>>> from the rest of the world. Check out the tofrodos package.
>> Since 90% of all computers are DOS/Windows, and got that method from
>> CP/M, which did it that way back in 1976/77, your "gratuitously
>> different" comment is absurdly wrong.
> Actually, it dates back further than that, to ASR33 teletype machines,
> where you needed to issue separate carriage return and line feed
> characters to end a line - to i) physically return the carriage to the
> beginning of the line, and ii) feed a line of paper (turn the platten).

While I'm too young to have used an ASR33, I'm old enough to have
used typewriters, and fart with dot matrix printers by sending only
^M after the line, and watching lines print over each other.

So shame on me.

> (Anybody else out there old enough to remember when ASR33s where THE
> standard i/o device? :-)
> CR+LF is also required in most Internet protocols.
> This is one of the surprising areas, where the Microsoft products get
> things right, and the Unix world messes up.

And the pre-OSX Macs used ^M as line separator.

Regarding a mess-up, I disagree. When looking for EOL, it's far
easier to scan for a single byte than for a ^M^J pair. Unix, having
print spools and drivers, was (since there are so few text-only
printers anymore) easily able to notice a
in the data stream and
replace it with a ^M^J.

> There are some good historical references at:
> http://en.wikipedia.org/wiki/Newline
> http://www.rfc-editor.org/EOLstory.txt
> http://www.w3.org/TR/newline

- --
Ron Johnson, Jr.
Jefferson LA USA

"I must acknowledge, once and for all, that the purpose of
diplomacy is to prolong a crisis.", Mr. Spock

Version: GnuPG v1.4.9 (GNU/Linux)


To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Thread Tools

All times are GMT. The time now is 06:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org