How to transform line breaks in a message documents in between the Windows and also Unix/Linux layouts?
Just how do I transform line breaks in a message documents in between the Windows and also Unix/Linux layouts?
I have a *nix setting, yet that I require to import and also export information with the Windows - design line breaks. I assumed there would certainly be a typical energy or command to do this, yet I can not appear to locate it.
One alternative is to make use of
unix2dos (and also
dos2unix for returning) on the command line.
An additional is to make use of a full-screen editor:
For vi:: set ff = dos to set the line ends to be dos line endings.
For emacs: C - x [ENTER ] f dos [ENTER ]
For your favorite GUI based editor (eg. jedit) I advise examining the guidebook or Google.
Last but not least if you do not intend to manage a full-screen editor and also simply do it making use of extra usual energies and also such (or do not have actually unix2dos mounted):
tr -d '\r' < infile > outfile to go from Windows - > Unix
awk 'sub("$", "\r")' unixfile.txt > winfile.txt to go from Unix - > Windows as
tr can not go from Unix to Windows.