The grep manual says "By default, grep prints the matching lines.". What does this matching lines says. When I tried its prints the whole paragraph containing the pattern.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
if you are using vi, and you are on the line you are looking for, moving onle line down using your cursor keys, if you are jumping too much, it means that your paragraph contains more than one line on the terminal. grep -n . filename will show you all the lines preceded by a line number and column sigh (:) so you can differentiate between lines in the sense of text editor vs lines in the sense of screen real estate. for grep, a line is delimited by a new line character, not by 80 characters that you see on a standard terminal window. if you are running a putty terminal or any other xterm (as in gnome's terminal), stretch your terminal size to a larger one and you will see the lines realign themselves. Hope this helps you understand. |
|||
|
|

\n) until the end of the paragraph... – jasonwryan Dec 7 '12 at 1:52