title: How to remove header and footer records of a flat file using UNIX shell script?
body: <p>I am having a flat file as give below. How do I delete the header and footer from the file using UNIX shell script and rewrite the same file.</p>
  
  <pre><code>9 20050427 HEADER RECORD
  0000000 00000 000000000 123456 00 654321 DATARECORD
  0000000 00000 000000000 123456 00 654321 DATARECORD
  0000000 00000 000000000 123456 00 654321 DATARECORD
  0000000 00000 000000000 123456 00 654321 DATARECORD
  6 20050427 TRAILER RECORD
  </code></pre>
  
  <p>Thanks,
  Arun</p>