8.6.14 Edit a file in place using a script
The following script will remove lines 5–10 and lines 16–20 in
ed $1 <<EOF
ed commands are the same as
commands. Editing from the back of file makes it easy for scripting.