[comp.sys.apple2] Uploading files from GS to Unix.

sharris@chopin.udel.edu (Scott A Harris) (03/19/91)

Hello again, I have created a 16 page paper on AppleWorks GS and I have 
uploaded it to the mainframe (a unix bases system running Sun O.S. v 4.1.1)
Unfortunately the file had been stripped of carriage returns so that I am
help less to do any typed of editing.  My question is, is there a way to 
keep the returns in and where is the program that will convert GS line feeds
to unix line feeds.
Thanks in advance.
Scott Harris
 
-- 
Scott A. Harris   sharris @ brahms.udel.edu   sharris @ chopin.udel.edu 
                 HIO01142 @ udelvm.udel.edu    harris @ freezer.it.udel.edu    
     	       71311,2700 @ CompuServe      s.harris12 @ GEnie                   

lucifer@world.std.com (Kevin S Green) (03/19/91)

In article <16701@chopin.udel.edu> sharris@chopin.udel.edu (Scott A Harris) writes:
>Hello again, I have created a 16 page paper on AppleWorks GS and I have 
>uploaded it to the mainframe (a unix bases system running Sun O.S. v 4.1.1)
>Unfortunately the file had been stripped of carriage returns so that I am
>help less to do any typed of editing.  My question is, is there a way to 
>keep the returns in and where is the program that will convert GS line feeds
>to unix line feeds.

Scott,
 There is a program called TextDragon that will convert to and
from Unix newline characters. I got my copy from America Online
but you should be able to find it on CIS or GEnie.

>Thanks in advance.

You're welcome.



-- 
Kevin S. Green / lucifer@world.std.com / {xylogics;uunet}!world!lucifer
Party naked... /AOL: Gargoth / Pro-line: kgreen@pro-angmar

gwyn@smoke.brl.mil (Doug Gwyn) (03/19/91)

In article <16701@chopin.udel.edu> sharris@chopin.udel.edu (Scott A Harris) writes:
>Hello again, I have created a 16 page paper on AppleWorks GS and I have 
>uploaded it to the mainframe (a unix bases system running Sun O.S. v 4.1.1)
>Unfortunately the file had been stripped of carriage returns so that I am
>help less to do any typed of editing.  My question is, is there a way to 
>keep the returns in and where is the program that will convert GS line feeds
>to unix line feeds.

Sure; any decent file transfer protocol will support text-mode transfers
that preserve line delimiters (using whatever is appropriate on each end).
Failing that, transmission of the file in uninterpreted binary mode would
produce a UNIX file containing ASCII CR delimiters, which can be turned
into the UNIX newline convention's ASCII LF characters using the command:
	tr '\015' '\012' < apple_image > unix_text

marekp@pnet91.cts.com (Marek Pawlowski) (03/19/91)

(This should be included in some sort of FAQ monthly posting)

To convert Control-M's to Control-J's (Apple, and Unix formats, respectively),
under Unix, execute the following command from your shell prompt:

tr '\015' '\012' <Apple_File_Name >New_Unix_File_Name

An explanation:  tr is a common abbreviation for "translate", and is the name
of the binary file which will do the conversion for you.  The two numbers,
with a slash preceding them, surrounded by single brackets, are the OCTAL
codes for Control-M and Control-J, respectively.  You can put whatever
characters in there if you wish (eg: tr 'A' 'B' <foo >bar, will replace all
occurences of 'A' with 'B').

I honestly hope that helps..

/* Marek Pawlowski, marekp@{generic|pnet91|bkj386|torag|aunix}.uucp  [CONT] */
/* {albert|wookumz|apple-gunkies|pogo|churchy|geech|spiff|mole}.ai.mit.edu  */
/* President, Intelligent Twist Software, 250 Harding Blvd, PO BOX 32017    */
/* Richmond Hill, Ontario, L4C 9M7, CANADA.  An ideal route is as follows:  */
/* { Ph: (416) 884-4501 4-8pm EDT } generic!pnet91!marekp@zoo.toronto.edu   */