Having trouble finding text with grep? Try grepping with color



Having trouble finding a needle in a haystack? You can always use grep --color to find what you are looking for. This method is best used for finding a specific piece of text in a document that is all on one line, or a unique string of text within a repetitious document. I have provided the syntax for this grep option below:

grep --color "text" filename

Example:

Leave a Reply