title: Modifying error and log messages on fly
body: <p>I have a situation wherein I want to send error and log messages to a same file. To distinguish between the error and log messages I am appending the log messages like this :</p>
  
  <p>file would look like this : </p>
  
  <pre><code>===============log_and_error_msg.txt =========
  ERR: This message is an error message
  INF: This is a log message 
  </code></pre>
  
  <p>so that anybody interested in error messages can <code>grep "ERR" log_and_error_msg.txt</code></p>
  
  <p>suppose I am executing some shell script like this </p>
  
  <pre><code>./shellscript 2&gt;&gt;log_and_error_msg.txt 1&gt;&gt;log_and_error_msg.txt
  </code></pre>
  
  <p>How do I add ERR and INF on fly to each message on fly ??</p>