title: Append to beginning and ending of each line?
body: <p>I'm working on a <code>sed</code> script that creates a HTML file. I want to append paragraph tags to the beginning and ending of each line but can't figure out how that would work.</p>
  
  <p>Right now I have the following <code>sed</code> script:</p>
  
  <pre><code>1i\
  &lt;html&gt;\
  &lt;head&gt;&lt;title&gt;sed generated html&lt;/title&gt;&lt;/head&gt;\
  &lt;body&gt;\
  &lt;pre&gt;
  $a\
  &lt;/pre&gt;\
  &lt;/body&gt;\
  &lt;/html&gt;
  </code></pre>
  
  <p>How would I be able to enclose every line in a <code>&lt;p&gt;</code> and <code>&lt;/p&gt;</code> tag?</p>
  
  <p>Example:</p>
  
  <p><strong>test.txt</strong></p>
  
  <pre><code>This is a test file.
  This is another line in the test file.
  </code></pre>
  
  <p>Output with the <code>sed</code> script:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;sed generated html&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;pre&gt;
  &lt;p&gt;This is a test file.&lt;/p&gt;
  &lt;p&gt;This is another line in the test file.&lt;/p&gt;
  &lt;/pre&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>