Converting linefeeds in text files


Subject: Converting linefeeds in text files
From: Brandon Barnes (jbbarnes@gci.net)
Date: Mon Dec 22 2003 - 01:48:41 AKST


I sometimes find text files on my Linux system that must have been ftpd
from a Windows machine in binary mode, because they have Carriage
Return/Line Feed (hex 0D 0A) instead of plain linefeeds (hex 0A). Is
there some simple command I can run that will either strip carriage
return characters from a file or add them if I want to go the other
direction? Also, I seem to recall reading that Windows uses hex
character 1A for an end-of-file marker, and Linux uses 04. So that would
probably need to be taken into account, too.

Thanks.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Mon Dec 22 2003 - 01:51:27 AKST