Want to see how many times you used the word very
in a file?
There are a couple of easy ways.
First, tell vi
to stop searching when you get to the end of the file.
Type the command
or put it in your
Move to the top of the file with the
Search for the first very
with the command
(HINT: using the
word-limiting regular expression
instead will keep you from matching words like every
To find the next very
, type the
, you've found all of
Use the command:
The matching lines will scroll down your screen.
To find the line numbers, too, type