snipt

Ctrl+h for KB shortcuts

Bash

tar a folder excluding svn metadata

tar cvf sdk.tar --exclude=\.svn sdk/
https://snipt.net/embed/73663da644ac50233be55f708ed8d14e/
https://snipt.net/raw/73663da644ac50233be55f708ed8d14e/
73663da644ac50233be55f708ed8d14e
bash
Bash
1
2016-09-26T01:39:07
True
False
False
/api/public/snipt/7248/
tar-a-folder-excluding-svn-metadata
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>tar cvf sdk.tar --exclude<span class="o">=</span><span class="se">\.</span>svn sdk/ </span></pre></div> </td></tr></table>
bash, exclude, metadata, svn, tar

XSLT

Drop metadata elements

1
2
3
4
5
<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()[not(name()='metadata')))]]"/>
    </xsl:copy>
</xsl:template>
https://snipt.net/embed/e5ae5cf6c071a82a0f414ee3518c93d6/
https://snipt.net/raw/e5ae5cf6c071a82a0f414ee3518c93d6/
e5ae5cf6c071a82a0f414ee3518c93d6
xslt
XSLT
5
2016-09-22T12:49:26
True
False
False
/api/public/snipt/6756/
drop-metadata-elements
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="k">&lt;xsl:template</span> <span class="na">match=</span><span class="s">&quot;@*|node()&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">&lt;xsl:copy</span><span class="nt">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">&lt;xsl:apply-templates</span> <span class="na">select=</span><span class="s">&quot;@*|node()[not(name()=&#39;metadata&#39;)))]]&quot;</span><span class="nt">/&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">&lt;/xsl:copy&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="k">&lt;/xsl:template&gt;</span> </span></pre></div> </td></tr></table>
metadata, xslt
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.