snipt

Ctrl+h for KB shortcuts

Bash

add newlines to one-line xml string

sed 's/\(<\/[a-zA-Z0-9]*>\)/\1\
/g'
https://snipt.net/embed/ef54209ac6189b5143e415f98ea033e0/
/raw/ef54209ac6189b5143e415f98ea033e0/
ef54209ac6189b5143e415f98ea033e0
bash
Bash
2
2019-07-16T20:30:45
True
False
False
/api/public/snipt/217/
add-newlines-to-one-line-xml-string
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>sed <span class="s1">&#39;s/\(&lt;\/[a-zA-Z0-9]*&gt;\)/\1\</span> </span><span id="L-2"><a name="L-2"></a><span class="s1">/g&#39;</span> </span></pre></div> </td></tr></table>
bash, newline, sed, xml