title: Read Command : Display the prompt in color (or enable interpretation of backslash escapes)
body: <p>I often use something like <code>read -e -p "&gt; All good ? (y/n)" -n 1 confirm;</code> to ask a confirm to the user.</p>
  
  <p>I'm looking for a way to colorize the output, as the command <code>echo -e</code> does :</p>
  
  <pre><code>echo -e "\033[31m";
  echo "Foobar";       // will be displayed in red
  echo -e "\033[00m";
  </code></pre>
  
  <p>I'm using xterm.</p>
  
  <p>In <code>man echo</code>, it says : </p>
  
  <blockquote>
    <p>-e     enable interpretation of backslash escapes</p>
  </blockquote>
  
  <p>Is there a way to do the same thing with the <code>read</code> command ? (nothing in the man page :( <code>-r</code> option doesn't work)</p>