X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,fdff6929bbc2b6a1 X-Google-Attributes: gidf996b,public X-Google-Thread: fbb9d,fdff6929bbc2b6a1 X-Google-Attributes: gidfbb9d,public X-Google-ArrivalTime: 1995-01-12 04:27:29 PST Path: nntp.gmd.de!dearn!blekul11!idefix.CS.kuleuven.ac.be!ub4b!EU.net!Germany.EU.net! howland.reston.ans.net!news.sprintlink.net!sashimi.wwa.com!not-for-mail From: psamuels@hmc.edu (Peter Samuelson) Newsgroups: alt.ascii-art,rec.arts.ascii Subject: Talk: Uploading and Trailing CRs Date: 11 Jan 1995 18:02:36 -0600 Organization: minimal Lines: 24 Sender: boba@gagme.wwa.com Approved: boba@wwa.com Message-ID: <3f1ris$7f9@gagme.wwa.com> References: <9501101909.aa24584@sfa.sfa.ope.ed.gov> <3f01ta$im4@gagme.wwa.com> NNTP-Posting-Host: gagme.wwa.com Xref: nntp.gmd.de alt.ascii-art:18887 rec.arts.ascii:3551 Daniel Au speaking: > Does anyone else have problems with such as the one below...I assume > that the person uploaded a file and got all the trailing M's, which I > know occurs with any text file because it happens to me too. It's a consequence of an old argument about text file format. MS-DOS machines end lines with character 13 (CR) then character 10 (LF); UNIX ends lines with only the LF, and other operating systems take sides. The workstation I'm on has a program, dos2unix, that strips the extraneous ^M's out of a text file, but if you don't have something of that name (I think it's a Sun thing) you can use the command sed 's/[^ -~]$//' < filename > newfilename (in UNIX) to do the same thing (translate DOS text from {filename} into {newfilename}). It would also filter out other control codes, including such nice things as HT, BEL and ESC, but only if they occurred at the end of a line, which they wouldn't be likely to, so it's pretty safe. In any case, it's the best I can do. Peter