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