Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!gargoyle!ddsw1!dattier From: dattier@ddsw1.MCS.COM (David W. Tamkin) Newsgroups: comp.sys.cbm Subject: Re: ASCII Uploading Problems (Survey file) Message-ID: <1991Jan27.080016.29441@ddsw1.MCS.COM> Date: 27 Jan 91 08:00:16 GMT References: Organization: Contributor Account at ddsw1, Wheeling, Illinois Lines: 35 lcs@remus.rutgers.edu (Lyle C. Seplowitz) wrote in : | My problem has been that a straight upload of an ASCII file results in | the text being all on one line. The TR command fixes this. Right. We store files for our Commodore eight-bits with only CR's as line separators without LF's. Unix wants LF's without CR's. tr can change one to the other. A Unix system displays text with CR's but no LF's on a single line because it doesn't recognize a CR as a line terminator. | However, | now I can't seem to upload the entire file (upload aborts for some | reason--I've tried several versions of the file). So I used Desterm's | transmit buffer feature to write to text file directly into an EMACS | file. This works fine except that there is an additional carriage | return added to each line. For those familiar with UNIX, the man pages | state that this command translates the input. I've tried experimenting | with this command with no luck...anyone have any suggestions? Sorry | that I keep coming back with more problems. Right. DesTerm likes to follow DOS-world conventions: talking in true ASCII (I consider it one of DesTerm's most glaring shortcomings that one cannot do a protocol upload of a PETSCII disk file nor write a file in PETSCII while one downloads it; DesTerm will translate an existing disk file if it fits into the buffer, but since it measures buffer use in lines rather than characters, it doesn't take a very long file to overload the buffer area) and using CR/LF pairs as line terminators. To change them to lone LF's, tr -d "\015" < infile > outfile The -d option of tr says to remove all characters in the source string. David Tamkin Box 7002 Des Plaines IL 60018-7002 708 518 6769 312 693 0591 MCI Mail: 426-1818 GEnie: D.W.TAMKIN CIS: 73720,1570 dattier@ddsw1.mcs.com