NetBSD/bin/ed/test/g2.ed

8 lines
75 B
Bash

#!/bin/sh -
../ed - <<\EOT
r \g2.d
g/[2-4]/-1,+1c\
hello world
w \g2.o
EOT