0

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

-1

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

|improve this answer|||||
  • 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.