<?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>WEBPIRATEN &#187; Shell</title>
	<atom:link href="http://webpiraten.de/index.php/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://webpiraten.de</link>
	<description>Techblog</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:52:32 +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>shell do something in a while</title>
		<link>http://webpiraten.de/index.php/php/shell-do-something-in-a-while/</link>
		<comments>http://webpiraten.de/index.php/php/shell-do-something-in-a-while/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 11:11:28 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[do]]></category>
		<category><![CDATA[exit]]></category>
		<category><![CDATA[while]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=305</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: bash; title: ; notranslate">
#!/bin/bash

DONE=0
while [ $DONE -eq 0 ]
do
    #do something and return something else than 0 when you want to exit this circle
    DONE=$?
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/php/shell-do-something-in-a-while/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>file encoding mit iconv auf der console</title>
		<link>http://webpiraten.de/index.php/linux/file-encoding-mit-iconv-auf-der-console/</link>
		<comments>http://webpiraten.de/index.php/linux/file-encoding-mit-iconv-auf-der-console/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 16:15:56 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=273</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: bash; title: ; notranslate">
iconv --from-code=ISO-8859-1 --to-code=UTF-8 file_to_convert.txt &gt; file_converted.txt
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/linux/file-encoding-mit-iconv-auf-der-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mit shell script und diff dateien prüfen</title>
		<link>http://webpiraten.de/index.php/server/mit-shell-script-und-diff-dateien-prufen/</link>
		<comments>http://webpiraten.de/index.php/server/mit-shell-script-und-diff-dateien-prufen/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 11:52:52 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=266</guid>
		<description><![CDATA[Um durch etwaige Cronjobs eine Prüfung von 2 Dateien und darauf folgende Aktionen zu erzeugen, kann ein shell script Verwendung finden.]]></description>
			<content:encoded><![CDATA[<p>Um durch etwaige Cronjobs eine Prüfung von 2 Dateien und darauf folgende Aktionen zu erzeugen, kann ein shell script Verwendung finden.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash

SOURCE=/mount/data/new_file.txt
TARGET=/srv/www/vhosts/www/app/config/old_file.txt

diff -i -b -B -q ${SOURCE} ${TARGET}

if [ ! $? -eq 0 ]
then
    echo &quot;new file is different from old one - copy new one to old&quot;
    cp ${SOURCE} ${TARGET}
else
    echo &quot;no difference between files - nothing to do&quot;
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/server/mit-shell-script-und-diff-dateien-prufen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Scripting Guide</title>
		<link>http://webpiraten.de/index.php/server/shell-scripting-guide/</link>
		<comments>http://webpiraten.de/index.php/server/shell-scripting-guide/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:04:51 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bin]]></category>
		<category><![CDATA[freeos]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=221</guid>
		<description><![CDATA[Hier findet Ihr den Shell Scripting Guide: freeos.com/guides/lsst/ Dann kann man beispielsweise so kleine Helferlein zum Löschen von Logs und Caches wie diesen hier basteln:]]></description>
			<content:encoded><![CDATA[<p>Hier findet Ihr den Shell Scripting Guide:</p>
<p><a href="http://www.freeos.com/guides/lsst/" target="_blank">freeos.com/guides/lsst/</a></p>
<p>Dann kann man beispielsweise so kleine Helferlein zum Löschen von Logs und Caches wie diesen hier basteln:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
cd `dirname $0` # go to scripts dir
cd .. # step ahead
arr[0]='Application1/app/cache/*'
arr[1]='Application1/var/cache/*'
arr[2]='Application2/application/cache/*'
arr[3]='Application2/application/logs/*'
arr[4]='Application2/pub/tmp/*'
arr[5]='Application3/application/cache/*'
arr[6]='Application3/application/logs/*'
arr[7]='Application3/pub/tmp/*'

i=0
while [ $i -lt ${#arr[@]} ]
do

rm -rf ${arr[$i]}
echo &quot;${arr[$i]} deleted&quot;

(( i=$i+1 ))
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/server/shell-scripting-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

