The program I'm working on has an option to enable/disable the color codes in it's output.
I want to test if this feature works as expected. This is what I tried:
$ myprogram | grep -q '\e[32m' # testing for green color $ myprogram | grep -q '\e' $ myprogram | grep -q '\033'
I also tried the same commands with double backslashes and without quotes.
But none of this works.
How can test if my program output contains any color codes?