I know in bash I can print a colorful string, like:
echo -e "\033[33;1mhello\033[0m"
The output in a shell will be hello with golden color. But when I redirect the output to a file test.txt, the \033[33; will be in the text file too. However the grep --color=auto command won't redirect these characters into the text file. How can it do this?