title: how to write a bash script like the ones used in init.d?
body: <p>I have to write a bash script that makes lot of things. I'd like to print messages as nice as init scripts do. For example:  </p>
  
  <pre><code> Doing A... [OK]  
   Doing B... [ERROR]  
   ....
  </code></pre>
  
  <p>Do you know any way to make this?</p>
  
  <p>Thanks in advance</p>