Re: text file from Linux to windows.



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). (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.

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

Miles Fidelman


maybe someone allready answerd but ...
unix default line brake is ASCII 10 and windows is 13.

You can use unix2dos or tofrodos to change it.

--
--
Could you at least use man ?
Jabka Atu (aka mha13/Mashrom Head) || bsh83.blogspot.com
--


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



Relevant Pages

  • Re: text file from Linux to windows.
    ... open the file in note pad, I find files are not having line break, but ... having a character in place of line break. ... Windows happens to end lines in a way that's gratuitously different from the ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • RE: Panels in Xfce4 in Squeeze
    ... new character for your Windows Live™ Messenger. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: No addr book after KB914454
    ... Then I tried Windows Update Install a second time. ... |> a doublebyte alphabetic character is represented simply by a null followed ... |> doublebyte character and the letter character matches the other half, ...
    (microsoft.public.windowsupdate)
  • Re: More fun with "my" New Laptop
    ... George Graves wrote: ... Not so happy about getting WiFi to work on Windows though. ... (you need to enter it as a 26 character HEX code, ... disabling WEP allowed the Dell to connect instantly. ...
    (comp.sys.mac.advocacy)
  • Re: More fun with "my" New Laptop
    ... Not so happy about getting WiFi to work on Windows though. ... "other" type in the network name and the WEP code ... (you need to enter it as a 26 character HEX code, ... disabling WEP allowed the Dell to connect instantly. ...
    (comp.sys.mac.advocacy)