[comp.sys.mac.programmer] Need MPW script to replace LF with CR

yeung@reed.UUCP (Woodrow Yeung) (09/23/90)

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.

Thanks in advance.

Woody Yeung
yeung@reed
Tektronix!reed!yeung

laird@slum.MV.COM (Laird Heal) (10/01/90)

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.