"extra" carriage return/line feed information on files edited in Windows
Why do I see "extra" carriage return/line feed information on files edited in Windows when they are viewed in UNIX?
Lines in text files that have been created or updated under DOS or Windows end with:
Whereas lines in text files created or updated under UNIX end with only:
\r = return (CR) octal 015
\n = new-line (NL) octal 012
If you want a file created under DOS or Windows to look good under UNIX, you can run the following command. Note: This will delete *all* the CRs from the file.
tr -d "\r" < input_dos_or_win_file > output_unix_file
More support for:
Software version: 3.5, 3.6
Operating system(s): Windows 2000, Windows NT
Software edition: All Editions
Reference #: 1044658
Modified date: 06 November 2011