Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!charon!cs1552ao From: cs1552ao@charon.unm.edu (Lazlo Nibble) Newsgroups: comp.sys.apple Subject: Re: CR/CR-LF Problems. Message-ID: <4542@charon.unm.edu> Date: 26 Feb 89 20:56:13 GMT References: <147@cires.colorado.edu> Reply-To: cs1552ao@charon.unm.edu.UUCP (Lazlo Nibble) Organization: Studio Nibble -- One Tree Hill, New Mexico Lines: 51 >Unix people, stick this in your .cshrc: >---Cut Here--- >alias nl2cr "cat \!^ | tr '\012' '\015' > \!^.X ; rm -f \!^ ; mv \!^.X \!^" >alias cr2nl "cat \!^ | tr '\015' '\012' > \!^.X ; rm -f \!^ ; mv \!^.X \!^" > >#Before you download a Unix file to your Apple, type "nl2cr " and after >#you upload an Apple file to the Unix system type "cr2nl ". Takes care >#of the incompatibilities between the Apple and Unix line delimiters. >#-- >#Lazlo Nibble >---Cut Here--- > >This was posted to this newsgroup some time ago, and I had waited to re-post >it, since I thought surely someone else would have by now. (or even Lazlo >might have) > >But, since it didn't show up on it's own... > >--Rob Cuthbertson Yow! Have I been ARCHIVED yet? Two small shellscripts can also do the job for you in a slightly more friendly and informative manner: #! /bin/sh # nl2cr -- convert UNIX newlines to Apple II CRs for i in $* do echo -n $i': ' tr '\012' '\015' < $i > $i.X mv -f $i.X $i echo 'done' done #! /bin/sh # cr2nl -- convert Apple II CRs to UNIX newlines for i in $* do echo -n $i': ' tr '\015' '\012' < $i > $i.X mv -f $i.X $i echo 'done' done I realize that BinSCII makes all this hoo-hah obsolete, but what the heck. I still use 'em to download textfiles and such. Lazlo ------------------------------------------------------------------------------ cs1552ao@charon.unm.edu "Shshshsh-Shop as usual...and avoid panic buying."