1

I am looking for a tool which takes a file in input and a word to search. It should display the file with color the words if it corresponds to the search.

Like grep --colors but displays all the file.

Is there something already exists ?

Example : cat /etc/passwd | colors root Display all /etc/passwd file and color the words "root"

If I can change the color easily it would be great !

2

A little trick with grep will do the job:

grep --color "^\|root" /etc/passwd

Otherwise look here.

  • Super ! I didn't find these entries ! Thanks a lot – Dom Dec 6 '12 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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