Re^2: end of line character

Maarten Litmaath maart at cs.vu.nl
Sat Jul 8 11:39:35 AEST 1989


In article <429 at ncelvax.UUCP> cathy at ncelvax.UUCP (Cathy Benney) writes:
[how do I do newline conversions when moving files from UNIX to MS-DOS?]

BSD:
	% cat todos
	#!/bin/sed -f
	s/$/^M/
	% cat fromdos
	#!/bin/sed -f
	s/.$//
	%
SysV:
	% cat todos
	:
	cr="`ctrl M`"
	/bin/sed "s/$/$cr/" $1
	% cat fromdos
	:
	/bin/sed 's/.$//' $1
	%
-- 
"I HATE arbitrary limits, especially when |Maarten Litmaath @ VU Amsterdam:
   they're small."  (Stephen Savitzky)    |maart at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.questions mailing list