On Sat, 27 Apr 2002 17:41:47 -0500, Glenn McCorkle wrote: > On Sat Apr 27 01:27:41 2002, [EMAIL PROTECTED] wrote:
>> Hello: >> Can anyone here recommend a good utility program for removing >> the CTRL + LF characters, i.e, the "^M" characters from the >> ends of lines in DOS text files? >> If I should import a DOS text file into a directory in my >> BasicLinux OS, the CTRL + LF characters will appear at the >> end of every line when the file is viewed within Linux. >> This problem is not due to a bug in either of the operating >> systems involved. The problem is simply one of a minor >> compatibility issue of the two operating systems. I have >> seen some technical explanations for this phenomena on a URL >> somewhere. I would suppose there must exist some good >> work-arounds and other solutions to handle the problem. >> Does anyone here know of a simple way to deal with it? > The "quik-n-dirty" method.... > Upload them to a Linux FTP server in "ASCII mode". > Now download them in "Binary mode". > Viola....... no CR+LFs > BTW, > What kind of file do you have which has ^M ??? > Mine have hex(0d 0a) dec(13 10)==(CR LF) > I have seen ^M used in some modem init strings. > But I have never seen it at the end of a line in a text file. In a modem init string the CTRL + M character only causes a line feed so as to start the next series of characters on another line. In this case the CTRL + M character only makes the output on your terminal screen look better and to seem to make more sense. I have performed a few experiments along those lines. If you use a DOS text editor to write a simple text file, and if you terminate your line endings by pressing the "enter" key, the CTRL + M characters will appear at the end of every line if you import your DOS text file into a Linux box and then view the file with a Linux file viewer or file editor. This is not a bug. It is just a minor platform compatibility problem and there are some rather easy ways to deal with it. Sam Heywood -- This mail was written by user of The Arachne Browser - http://arachne.cz/
