title: linux delete multiple lines in a file
body: <p>I am an iOS developer, not familiar with Linux, I searched for a long time but still could not solve my problem. I hope someone can help me, thanks!</p>
  
  <p>Before delete:</p>
  
  <pre><code>Other contents......
  
  #
  # Proxy server for iTerm &amp; Terminal Setup Script
  # version 0.1
  # VincentSit
  # Nov 26, 2014
  #
  function start_proxy {
   export http_proxy='abc.efgh.com:1234'
   export HTTPS_PROXY='abc.efgh.com:1234'
   }
  
  function stop_proxy {
   export http_proxy=''
   export HTTPS_PROXY=''
   }
  
  Other contents......
  </code></pre>
  
  <p>After delete:</p>
  
  <pre><code>Other contents......
  Other contents......
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I'm writing a <strong>shell</strong> script(can not use other languages.). On users system has a text file named <code>abc</code>, content is probably something like this:</p>
  
  <pre><code># Other comments......
  # Other comments......
  # Other comments......
  Other contents......
  # Other comments......
  
  #
  # Proxy server for iTerm &amp; Terminal Setup Script
  # version 0.1
  # VincentSit
  # Nov 26, 2014
  #
  function start_proxy {
   export http_proxy='abc.efgh.com:1234'
   export HTTPS_PROXY='abc.efgh.com:1234'
   }
  
  function stop_proxy {
   export http_proxy=''
   export HTTPS_PROXY=''
   }
  
  # Other comments......
  Other contents......
  # Other comments......
  # Other comments......
  </code></pre>
  
  <p>Which <code>Other contents ......</code> is fictional, can not use it as deleted condition.</p>
  
  <p>I just need to delete the following sections:</p>
  
  <pre><code>#
  # Proxy server for iTerm &amp; Terminal Setup Script
  # version 0.1
  # VincentSit
  # Nov 26, 2014
  #
  function start_proxy {
   export http_proxy='abc.efgh.com:1234'
   export HTTPS_PROXY='abc.efgh.com:1234'
   }
  
  function stop_proxy {
   export http_proxy=''
   export HTTPS_PROXY=''
   }
  </code></pre>
  
  <p>Do not need to delete other contents in this file.</p>
  
  <p>Because it runs on the user's system, I do not know the line number of the contents I want to delete.</p>
  
  <p>Finally look like this:</p>
  
  <pre><code># Other comments......
  # Other comments......
  # Other comments......
  Other contents......
  # Other comments......
  
  # Other comments......
  Other contents......
  # Other comments......
  # Other comments......
  </code></pre>
  
  <p>I think the answer might look like this:</p>
  
  <p><code>sed xxxxxx abc.txt</code>   </p>
  
  <p><code>awk xxxxxx abc.txt</code></p>