I have a command which generates colored output. I wish to grep the plain text of that command (while still preserving the color) for brackets. If I grep -F '['
, every line matches, due to the color codes.
How can I grep for brackets (or other plain text features) without losing the color?
Note: There are similar posts about grepping the color codes, or preserving the color, neither of which help here.