A range of line numbers can be used with the substitute
command as with the print command. For example,
will change "cat" into "cats" on the last five lines of
a file. In this directory there is a file "cliche"
containing a number of instances of the word "dog"; change
the instances of "dog" in the first five lines to "dogs".
Then rewrite the file and type "ready".
wouldn't send a dogs out on a night like this
wouldn't send a dog out on a night like this