title: How to replace a comment line which start with specific characters
body: <p>I have a fortran code with global comments, which start with a double exclamation mark (i.e., !!) and personal comments, which start with a single exclamation mark (i.e., !), and I just want to hide my personal comment lines (or substitute the line with another line, e.g., '! jw'). For example, the original code looks like this:</p>
  <pre><code>!! This is a global comment  
  Code..
  Code..
  
  ! This is a personal comment 
  code... ! This is a personal comment
  
  !! This is a global comment
  code...
  </code></pre>
  <p>Then, I want to update the original code as:</p>
  <pre><code>!! This is a global comment  
  Code..
  Code..
  
  ! jw
  code... ! jw
  
  !! This is a global comment
  code...
  </code></pre>
  <p>I have tried to use &quot;sed&quot; and &quot;awk&quot;, but I failed. So, would someone can help me? I prefer to use &quot;sed&quot; instead &quot;awk&quot; by the way.</p>