0047-ed.sh (219B)
1 #!/bin/sh 2 3 tmp=tmp.$$ 4 5 trap 'rm -f $tmp' EXIT 6 trap 'exit $?' HUP INT TERM 7 8 cat <<EOF > $tmp 9 LLLx 10 yLyLyLyxy 11 zzzzxy 12 EOF 13 14 $EXEC ../ed -s /dev/null <<EOF | diff -u $tmp - 15 i 16 LLL 17 . 18 s! *!x!4 19 p 20 s# *#y#g 21 p 22 s/\(^\|L\)y/z/g 23 p 24 EOF