title: How to delete the first character of the line only if that line matches with the given pattern
body: <p>I need to delete first character  at each line only if the given pattern matches with that line.</p>
  
  <p>I have tried by replacing the first character with space, but space is appending at the each line. </p>
  
  <pre><code> sed -e '/#/s/^/ /' 2.txt &gt; 1.txt
  </code></pre>
  
  <p>I need to remove the # from each line. Kindly suggest me how to make this.</p>