NetBSD/bin/ed/test/s1.ed

12 lines
108 B
Bash

#!/bin/sh -
../ed - <<\EOT
r \s1.d
s/\([^ ][^ ]*\)/(\1)/g
2s
/3/s
/\(4\)/sr
/\(.\)/srg
%s/i/&e/
w \s1.o
EOT