I have a C program that runs
execvp("grep", args);
Where args is an array {"grep", "test"}
(test being the word I want grep to find).
The issue is that grep's output is not coloured. In a normal bash shell, grep highlights test
in red, but in my program's output it just prints the line like
this is a test
with no highlighting or colours of any sort.
I'm also using execvp to execute some other commands which also produce coloured output in a bash shell, and have no colours in my output.
Is there any way to fix this? Something I need to do to stdout
?