<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Karlosp.net&#187; extract</title>
	<atom:link href="http://www.karlosp.net/blog/tag/extract/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlosp.net/blog</link>
	<description>Malo mešano na žaru</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:18:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Linux Extract Script</title>
		<link>http://www.karlosp.net/blog/2009/03/13/linux-extract-script/</link>
		<comments>http://www.karlosp.net/blog/2009/03/13/linux-extract-script/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 09:58:03 +0000</pubDate>
		<dc:creator>karlosp</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[extract]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.karlosp.net/blog/?p=576</guid>
		<description><![CDATA[PLAIN TEXT CODE: The following function will decompress a wide range of compressed filetypes. Add the function to '~/.bashrc' and then run with the syntax 'extract MyCompressedFile' &#160; &#160;extract &#40;&#41; &#123; &#160; &#160;if &#91; -f $1 &#93; ; then &#160; &#160; &#160; &#160;case $1 in &#160; &#160; &#160; &#160; &#160; &#160;*.tar.bz2&#41;&#160; &#160;tar xvjf $1&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">The following function will decompress a wide range of compressed filetypes. <span style="">Add</span> the function to <span style="color:#CC0000;">'~/.bashrc'</span> and then run with the syntax <span style="color:#CC0000;">'extract MyCompressedFile'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;extract <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;if <span style="color:#006600; font-weight:bold;">&#91;</span> -f $<span style="color:#800000;color:#800000;">1</span> <span style="color:#006600; font-weight:bold;">&#93;</span> ; then</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;case $<span style="color:#800000;color:#800000;">1</span> in</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">tar</span>.<span style="">bz2</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp;tar xvjf $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">tar</span>.<span style="">gz</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; tar xvzf $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; ;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">bz2</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;bunzip2 $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">rar</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;rar x $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">gz</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; gunzip $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">tar</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;tar xvf $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">tbz2</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; tar xvjf $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">tgz</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;tar xvzf $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; ;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">zip</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;unzip $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.<span style="">Z</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uncompress $<span style="color:#800000;color:#800000;">1</span>&nbsp; ;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*.7z<span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; 7z x $<span style="color:#800000;color:#800000;">1</span>&nbsp; &nbsp; &nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*<span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo <span style="color:#CC0000;">"don't know how to extract '$1'..."</span> ;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;esac</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;else</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;echo <span style="color:#CC0000;">"'$1' is not a valid file!"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;fi</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlosp.net/blog/2009/03/13/linux-extract-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

