[comp.sys.cbm] ASCII Uploading Problems

lcs@remus.rutgers.edu (Lyle C. Seplowitz) (01/20/91)

If anyone can help, I have uploaded the results of the Survey I
conducted on this newsgroup. However, in the resulting text file,
returns have been replaced by "^M" and therefore the entire file
contains one very long line.

I tried the suggestion that was posted here (using "tr \15 \12 <in >out")
without any luck. The file was originally in PETASCII, loaded into
Desterm's buffer and converted to ASCII.

Any suggestions...

lcs@remus.rutgers.edu (Lyle C. Seplowitz) (01/25/91)

I had been in contact with someone who gave me help on this topic
(refering to use of the TR command in UNIX). Unfortunately I am very
disorganized and I have a couple of names, but no description as to
what topics are related to them. Therefore I'm posting this question.

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. 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.

:)

cs4344af@evax.arl.utexas.edu (Fuzzy Fox) (01/25/91)

In article <Jan.25.01.08.59.1991.21574@remus.rutgers.edu> lcs@remus.rutgers.edu (Lyle C. Seplowitz) writes:
>
>However, now I can't seem to upload the entire file (upload aborts for some
>reason--I've tried several versions of the file).

What transfer protocol are you using?  I recommend Kermit for text
files.  It handles things like end-of-line characters for you.

>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.

Why not instead of using Emacs, just enter your text straight from the
command line?  Try this:

	cat >file

Then when cat waits for you to enter keyboard input, use the ascii
upload feature to send the file.  When it is done, press Ctrl-D to tell
cat to stop getting input.

-- 
begin 644 .signature
G5&AI<R!S<&%C92!I;G1E;G1I;VYA;&QY(&QE9G0@8FQA;FLN#0H:
 
end

dattier@ddsw1.MCS.COM (David W. Tamkin) (01/27/91)

lcs@remus.rutgers.edu (Lyle C. Seplowitz) wrote in
<Jan.25.01.08.59.1991.21574@remus.rutgers.edu>:

| 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

rknop@nntp-server.caltech.edu (Robert Andrew Knop) (01/28/91)

dattier@ddsw1.MCS.COM (David W. Tamkin) writes:

>(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)

A quick plug: Randy Winchester's KeyDOS Utility allows you to do ASCII/PETSCII
conversion when copying files; you can also read and print both ASCII and
PETSCII files.  This utility (and KeyDOS itself) are both in the
c128current/utilities directory at milton.

-Rob Knop
rknop@tybalt.caltech.edu