<?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>Der Lanwirt &#187; bash</title>
	<atom:link href="http://www.lanwirt.de/category/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lanwirt.de</link>
	<description>manchmal auch wanwirt oder sanwirt</description>
	<lastBuildDate>Thu, 04 Aug 2011 08:51:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19854</generator>
		<item>
		<title>checkurl: Prüfen, ob ein Wort auf einer Webseite vorkommt</title>
		<link>http://www.lanwirt.de/2007/11/10/checkurl-prufen-ob-ein-wort-auf-einer-webseite-vorkommt/</link>
		<comments>http://www.lanwirt.de/2007/11/10/checkurl-prufen-ob-ein-wort-auf-einer-webseite-vorkommt/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 20:43:36 +0000</pubDate>
		<dc:creator>Markus</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Tux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://markus.renschler.net/2007/11/10/checkurl-prufen-ob-ein-wort-auf-einer-webseite-vorkommt/</guid>
		<description><![CDATA[Mit dem folgenden Bash-Script kann man prüfen, ob auf einer Webseite ein bestimmtes Wort vorkommt: #!/bin/bash if [ $# -ne 2 ]; then echo "Usage: checkurl [URL] [string to search for]" echo echo "Exits with:" echo " 0=string found" echo " 1=string not found" exit 100 fi cres=`curl -s $1 &#124; grep -c $2` if [...]]]></description>
			<content:encoded><![CDATA[<p>Mit dem folgenden Bash-Script kann man prüfen, ob auf einer Webseite ein bestimmtes Wort vorkommt:</p>
<pre>
#!/bin/bash

if [ $# -ne 2 ]; then
        echo "Usage: checkurl [URL] [string to search for]"
        echo
        echo "Exits with:"
        echo "    0=string found"
        echo "    1=string not found"
        exit 100
fi

cres=`curl -s $1 | grep -c $2`

if [ $cres -lt 1 ]; then
        echo "not found"
        exit 1
else
        echo "found"
        exit 0
fi
</pre>
<p>Voraussetzung: curl sollte installiert sein</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lanwirt.de/2007/11/10/checkurl-prufen-ob-ein-wort-auf-einer-webseite-vorkommt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Konfigurationsdateien per SFTP kopieren</title>
		<link>http://www.lanwirt.de/2007/07/11/konfigurationsdateien-per-sftp-kopieren/</link>
		<comments>http://www.lanwirt.de/2007/07/11/konfigurationsdateien-per-sftp-kopieren/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 13:32:12 +0000</pubDate>
		<dc:creator>Markus</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Tux]]></category>

		<guid isPermaLink="false">http://markus.renschler.net/2007/07/11/konfigurationsdateien-per-sftp-kopieren/</guid>
		<description><![CDATA[Dieses Script kopiert per SFTP eine feste Menge von Dateien von einem aufs andere System. Da Kennwortauthentifizierung verwendet wird, eignet es sich nicht zur vollen Automatisierung. Ich starte es eben, wenn auf Server 1 Dateien verändert wurden, die auf Server 2 gleich sein sollen. #!/bin/bash configfiles="/etc/my.cnf /etc/resolv.conf /etc/hosts" targetServer="ZIELSERVER" for fil in $configfiles do if [...]]]></description>
			<content:encoded><![CDATA[<p>Dieses Script kopiert per SFTP eine feste Menge von Dateien von einem aufs andere System.<br />
Da Kennwortauthentifizierung verwendet wird, eignet es sich nicht zur vollen Automatisierung. Ich starte es eben, wenn auf Server 1 Dateien verändert wurden, die auf Server 2 gleich sein sollen.</p>
<pre>
#!/bin/bash

configfiles="/etc/my.cnf /etc/resolv.conf /etc/hosts"
targetServer="ZIELSERVER"

for fil in $configfiles
do
 if [ -e $fil ]; then
  copylist+="PUT $fil $fil \n"
 else
  echo "File not found: $fil"
 fi
done

echo -e "$copylist" | sftp $targetServer
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lanwirt.de/2007/07/11/konfigurationsdateien-per-sftp-kopieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ein ISO-Image mounten</title>
		<link>http://www.lanwirt.de/2007/07/10/ein-iso-image-mounten/</link>
		<comments>http://www.lanwirt.de/2007/07/10/ein-iso-image-mounten/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 18:59:26 +0000</pubDate>
		<dc:creator>Markus</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Tux]]></category>

		<guid isPermaLink="false">http://markus.renschler.net/2007/07/10/ein-iso-image-mounten/</guid>
		<description><![CDATA[Ganz einfach: mount -o loop -t iso9660 file.iso /mnt/test]]></description>
			<content:encoded><![CDATA[<p>Ganz einfach:<br />
<code>mount -o loop -t iso9660 file.iso /mnt/test</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lanwirt.de/2007/07/10/ein-iso-image-mounten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

