title: How to write a text file with color
body: <p>I'm trying to write a text file with two colors depending on the output. I using the <code>echo -e</code> command as I would when printing with colors in the console, like this:</p>
  
  <pre><code>RETURNED=$?
  if [ $RETURNED == 0 ]
     then
        echo -e "\e[1;32mffmpeg -t $DURACION -f x11grab -s $RESOLUCION -r ${FPS[j]} -b:v $BR -i :0.0 -y $NOMBRE\e[0m" &gt;&gt; file.txt
  
  fi
  </code></pre>
  
  <p>The idea would be: If the command worked, then write a green line, else use red. However I'm not getting any colored line in the text file.</p>