I'm working on a sed
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.
Right now I have the following sed
script:
1i\
<html>\
<head><title>sed generated html</title></head>\
<body>\
<pre>
$a\
</pre>\
</body>\
</html>
How would I be able to enclose every line in a <p>
and </p>
tag?
Example:
test.txt
This is a test file.
This is another line in the test file.
Output with the sed
script:
<html>
<head><title>sed generated html</title></head>
<body>
<pre>
<p>This is a test file.</p>
<p>This is another line in the test file.</p>
</pre>
</body>
</html>
and
in your sample??? – Arjun Mathew Dan Mar 23 '15 at 04:15