Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!daver!ditka!zinn!wgc386!slum!laird From: laird@slum.MV.COM (Laird Heal) Newsgroups: comp.sys.mac.programmer Subject: Re: Need MPW script to replace LF with CR Message-ID: <1990Oct1.134731.1926@slum.MV.COM> Date: 1 Oct 90 13:47:31 GMT References: <15501@reed.UUCP> <15503@reed.UUCP> Distribution: usa Organization: dis Lines: 19 In article <15503@reed.UUCP> yeung@reed.UUCP (Woodrow Yeung) writes: >Could someone provide me with a shell script that will replace linefeeds >with carriage returns in TEXT files? > >I can't figure out how to generate the escape code for LF and CR in the >replace command. > Here's what I use, not too often but enough to keep it on the worksheet of my Portable's hard disk: mcompress -d "Unix File" | translate "" "6n" > "Mac File"; Open "Mac File" where the first operand of translate comes from a cut on the first file I wanted to translate, and the second operand is option-d then n. Works fine. -- Laird Heal laird@slum.MV.COM It's hard to fight (Salem, NH) +1 603 898 1406 a conspiracy.