3 ms·
This is how I colorize with grep: cat <file> | grep -E --color "<regex>|$" Where `<regex>` is your pattern.
by loudmax 3y ago
This is how I colorize with grep:
cat <file> | grep -E --color "<regex>|$"
Where `<regex>` is your pattern.
- ralgozino 3y agoadding "or an end of the line" to the regex is pretty clever, I'm stealing it :) thanks!
- quickthrower2 3y agoObligatory “you don’t need cat”