Hacker News new | ask | show | jobs
by loudmax 960 days ago
This is how I colorize with grep:

  cat <file> | grep -E --color "<regex>|$"
Where `<regex>` is your pattern.
2 comments

adding "or an end of the line" to the regex is pretty clever, I'm stealing it :) thanks!
Obligatory “you don’t need cat”