Take the 2-minute tour ×
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.

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 ?

share|improve this question

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.

1  
Are you looking for this: unix.stackexchange.com/questions/366/… –  coffeMug Dec 1 '13 at 17:18

1 Answer 1

Use ack:

ack --passthru something /some/file

The result will look like this: enter image description here

share|improve this answer

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