To avoid just accumulating lines forever, you need some
way of getting rid of them. The 'd' command (delete) removes
lines you don't want. Since it also removes lines that
you do want if you tell it to, you should be careful
with this command. Deleting one line at a time
is always pretty safe. For example
will delete line 5 of a file. Try the following
sequence; note that I've used "cat"