title: Append to start and end of first few lines
body: <p>What sed command would allow me to append one string to the end of every line, a different string to the start of the first line, and a different string to the end of the fifth line?</p>
  
  <p>So far I have</p>
  
  <pre><code>    sed 's/$/&lt;br&gt;/' $FILE1 &gt;&gt; $FILE1_GETS_APPENDED_TO_THIS_FILE
  </code></pre>
  
  <p>to append a html break statement to the end of each line in the file1. I need to add a header statement around the first 5 lines though. Therefore, the start of the first line needs to have <code>&lt;h3&gt;</code> appended to it and the end of the fifth line needs <code>&lt;/h3&gt;</code> appened to it.</p>
  
  <p>Thanks!</p>