I want to insert a string in html before the first "<p" in the file, however I am having some difficulty.
thestring="<p>this is some sentence</p>"
sed -i "/<p/i${thestring}" somefile.html
"somefile.html" however contains multiple lines containing "<p" and the above inserts the string multiple times.
I have tried doing this:
sed -i "0,/<p/i${thestring}" somefile.html
or
sed -i "0,/<p/s//i${thestring}" somefile.html
but I'm getting no where.
What am I doing wrong?