sed newlines

Hans Mulder hansm at cs.kun.nl
Thu Jan 24 04:53:53 AEST 1991


In article <2056 at kluge.fiu.edu> acmfiu at serss0.fiu.edu (ACMFIU) asks:
>in a sed replacement expression, how can i insert a newline character?

Bourne shell and derivatives:

sed 's/foo/bar\
bletch/'

C shell and derivatives:

sed 's/foo/bar\\
bletch/'

This is on a Sun3 running SunOS 4.1.1 if it matters.


Have a nice day,

Hans Mulder	hansm at cs.kun.nl



More information about the Comp.unix.shell mailing list