I have this code in some file
<pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""><code>-Fix numcer one/Two
-EMM Support
-Fix update < broken
-Add support patch</code></pre>
</div>
</div><b><br />
I need to remove some characters and keep just this code
-Fix numcer one/Two
-EMM Support
-Fix update < broken
-Add support patch
I have try this code
#!/bin/bash
sed -n '/>-/,/</p' /home/Desktop/1 > /home/Desktop/2
sed -n '/^-*code>/p' /home/raed/Desktop/2 > /home/Desktop/3
sed -i 's#</code></pre>##' /home/Desktop/3
exit
But the code remove first line
-Fix numcer one/Two
Try this
sed 's/<[^>]*>//g' <file
It will remove everything between <
and the next >
(linewise).
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments