0

This question already has an answer here:

How do I highlight certain word using the cat command on the terminal?

marked as duplicate by Kusalananda, steeldriver, andcoz, Wouter Verhelst, GAD3R Jan 25 '17 at 14:54

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

Type cat (the name of your textfile) | grep (The word you want to highlight), e.g cat textfile | grep in.

  • 2
    This would only work if grep is aliased with --color. In addition, it is not needed to cat and then grep, you can just grep some_word textfile – Zumo de Vidrio Jan 25 '17 at 13:59
  • To be fair, the question requires the use of cat :) – dhag Jan 25 '17 at 14:32

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