[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LF --> CR on a UNIX?? HELP!



kenh@pacifier.rain.com (Ken Hoffmann) writes:


>Hello, all... I would like for someone to re-post the little shell script
>that converts UNIX textfiles to apple-readable textfiles... Somehow 
>converting LFs to CRs... 
> 
>Posting or E-Mail would be fine..
> 
>Thanks!
> 
>Ken

  Put the text between the '--'s into a file called 'convlf'.
--
tr '\012' '\015' < $1 > temp019845
mv temp019845 $1
--
  Then execute the following command:
 chmod ugo+x convlf.

  To convert LFs to CRs, then just do:

  convlf filename

  This script only works on one file at a time because it's also a
shell-independent script.  I could write one for csh that would do
multiple files, but I don't know /bin/sh.  Anyone?

-- 
 Jawaid Bazyar              |   Ask me about the GNO Multitasking Environment
 Procyon, Inc.              |   for the Apple IIgs!   
 bazyar@cs.uiuc.edu         |   P.O Box 620334
 --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 933-4649