grep color in bash

I'm having trouble getting grep color to work correctly in bash. Instead of highlighting it inserts [01;31me[K and [me[Ke into the text output.

Example:

echo "AAAA
TTTT" > test.txt
grep --color=always -E "^|AAAA" test.txt

Output:

## e[01;31me[KAAAAe[me[K
## e[01;31me[Ke[me[KTTTT

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.