3

This question already has an answer here:

I am looking for a command which would color a matching string in text. I.e. I am looking for functionality similar to what grep does, but I want to see the complete text not only the matching lines

Can somebody please advise whether such tool exists, or how I could best achieve this ?

marked as duplicate by manatwork, rush, jasonwryan, slm, Anthon Dec 1 '13 at 18:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

Use ack:

ack --passthru something /some/file

The result will look like this: enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.