handle backslash and ampersand correctly; from Diomidis; examples:
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 3 Nov 1992 01:25:32 +0000 (17:25 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 3 Nov 1992 01:25:32 +0000 (17:25 -0800)
commit64aaecabd45171f066c9bbec7a6e5b0e2ab77bf9
tree7eeb20046ce2d5e52a035e0ebb9bfb5276194d41
parent332e1cc9882e0ec24bc94304047d950f5fdcbf75
handle backslash and ampersand correctly; from Diomidis; examples:
echo '\foo' | sed -e 's/\\/\\e/' -e 's/^/\\\&/'
echo "foo" | sed -e 's/./\\\&/' produces \foo instead of \&oo.
echo "foo" | sed -e 's/./\\&/' produces \&oo instead of \foo.

SCCS-vsn: usr.bin/sed/compile.c 5.6
usr/src/usr.bin/sed/compile.c