<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: INI-FIle Parser als Einzeiler in Bash</title>
	<atom:link href="http://heinitz-it.de/archives/64/feed" rel="self" type="application/rss+xml" />
	<link>http://heinitz-it.de/archives/64</link>
	<description>Dipl. Ing. (FH), MBA Valentin Heinitz - freiberuflicher Softwareentwickler</description>
	<lastBuildDate>Thu, 10 Jun 2010 10:15:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: claus</title>
		<link>http://heinitz-it.de/archives/64/comment-page-1#comment-33</link>
		<dc:creator>claus</dc:creator>
		<pubDate>Thu, 10 Jun 2010 10:15:36 +0000</pubDate>
		<guid isPermaLink="false">http://heinitz-it.de/?p=64#comment-33</guid>
		<description>Sorry: oben versagt bei einem Blank im Value - besser:

#!/bin/bash
INIFILE=$1
SECTION=$2
ITEM=$3

sed -ne &#039;/^\s*[#;]/!{/^\s*\[&#039;$SECTION&#039;\]/,/^\s*\[.*\]/ s/.*&#039;$ITEM&#039;\s*[ =]\s*\&quot;\?\(.*\)[\&quot;\n]/\1/p}&#039; $INIFILE

der Key (immer ohne Blank) kann auch durch einen Blank statt eines &quot;=&quot; vom Value getrennt sein</description>
		<content:encoded><![CDATA[<p>Sorry: oben versagt bei einem Blank im Value &#8211; besser:</p>
<p>#!/bin/bash<br />
INIFILE=$1<br />
SECTION=$2<br />
ITEM=$3</p>
<p>sed -ne &#8216;/^\s*[#;]/!{/^\s*\['$SECTION'\]/,/^\s*\[.*\]/ s/.*&#8217;$ITEM&#8217;\s*[ =]\s*\&#8221;\?\(.*\)[\"\n]/\1/p}&#8217; $INIFILE</p>
<p>der Key (immer ohne Blank) kann auch durch einen Blank statt eines &#8220;=&#8221; vom Value getrennt sein</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claus</title>
		<link>http://heinitz-it.de/archives/64/comment-page-1#comment-19</link>
		<dc:creator>Claus</dc:creator>
		<pubDate>Fri, 21 May 2010 17:41:18 +0000</pubDate>
		<guid isPermaLink="false">http://heinitz-it.de/?p=64#comment-19</guid>
		<description>Probiere dieses - ein weiterer Vorschlag für einen 1-Zeiler:

#!/bin/bash
#   INIFILE=$1 SECTION=$2 ITEM=$3
sed -ne &#039;/^\s*[#;]/!{/^\[&#039;$2&#039;\]/,/^\[.*\]/H;${x;/&#039;$3&#039;[ =]/{s/.*&#039;$3&#039;\s*[ =]\s*\(\S\+\).\+/\1/g;s/\&quot;//g;p}}}&#039; $1</description>
		<content:encoded><![CDATA[<p>Probiere dieses &#8211; ein weiterer Vorschlag für einen 1-Zeiler:</p>
<p>#!/bin/bash<br />
#   INIFILE=$1 SECTION=$2 ITEM=$3<br />
sed -ne &#8216;/^\s*[#;]/!{/^\['$2'\]/,/^\[.*\]/H;${x;/&#8217;$3&#8242;[ =]/{s/.*&#8217;$3&#8242;\s*[ =]\s*\(\S\+\).\+/\1/g;s/\&#8221;//g;p}}}&#8217; $1</p>
]]></content:encoded>
	</item>
</channel>
</rss>

