For example, I have a output:Hello, this is the output.(let's say that for example hello is colored red, and the is colored green, and output is colored purple).Now, let's say that this is the output of a command named x.If I use this command, the output becomes white:x | grep helloI've read that one could use grep --color=always. However, this changes the color to highlight the result I searched for instead of keeping the original line colors.I want to keep the original line colors. How do I use grep while keeping them?
How do I use grep while keeping the original text color?
grep;pipe;colors;escape characters
You could do this, x | grep --color=never helloTo quickly test it, you can do,ls -l /etc/ --color=always | grep --color=never .