<?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: bash: variable variables</title>
	<atom:link href="http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/feed/" rel="self" type="application/rss+xml" />
	<link>http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/</link>
	<description>bits of: shell scripting, poetry, technical rubbish</description>
	<lastBuildDate>Thu, 02 Feb 2012 08:02:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: xOneca</title>
		<link>http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/comment-page-1/#comment-4450</link>
		<dc:creator>xOneca</dc:creator>
		<pubDate>Wed, 18 Jan 2012 10:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://pgl.yoyo.org/bits/?p=100#comment-4450</guid>
		<description>When scripting for dash you don&#039;t have the ${!var} option, so you must use the &quot;eval echo&quot; trick.

I have come with a simplified version of yours, omitting an &quot;echo&quot;:

  eval echo \$$tits

or, to set a variable:

  value=`eval echo \$$tits`</description>
		<content:encoded><![CDATA[<p>When scripting for dash you don't have the ${!var} option, so you must use the "eval echo" trick.</p>
<p>I have come with a simplified version of yours, omitting an "echo":</p>
<p>  eval echo \$$tits</p>
<p>or, to set a variable:</p>
<p>  value=`eval echo \$$tits`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pgl</title>
		<link>http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/comment-page-1/#comment-3208</link>
		<dc:creator>pgl</dc:creator>
		<pubDate>Sun, 19 Jun 2011 10:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://pgl.yoyo.org/bits/?p=100#comment-3208</guid>
		<description>That&#039;s right Rob - that&#039;s the first example I put at the top of the post. The others are just for completeness really.</description>
		<content:encoded><![CDATA[<p>That's right Rob - that's the first example I put at the top of the post. The others are just for completeness really.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Thomas</title>
		<link>http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/comment-page-1/#comment-3206</link>
		<dc:creator>Rob Thomas</dc:creator>
		<pubDate>Sun, 19 Jun 2011 05:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://pgl.yoyo.org/bits/?p=100#comment-3206</guid>
		<description>Actually, this is a bit out of date, and version of bash since version 3 (eg, after about Fedora 8 I think) can do this:

#!/bin/bash

foo=wibble
wibble=works

echo $foo
echo ${!foo}

Curly braces and an exclamation mark is a lot more intuitive than the old eval $$ stuff.</description>
		<content:encoded><![CDATA[<p>Actually, this is a bit out of date, and version of bash since version 3 (eg, after about Fedora 8 I think) can do this:</p>
<p>#!/bin/bash</p>
<p>foo=wibble<br />
wibble=works</p>
<p>echo $foo<br />
echo ${!foo}</p>
<p>Curly braces and an exclamation mark is a lot more intuitive than the old eval $$ stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jni</title>
		<link>http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/comment-page-1/#comment-2024</link>
		<dc:creator>Jni</dc:creator>
		<pubDate>Mon, 08 Nov 2010 06:13:54 +0000</pubDate>
		<guid isPermaLink="false">http://pgl.yoyo.org/bits/?p=100#comment-2024</guid>
		<description>Wow... you&#039;re among top google results and you just saved me hours of work... thanks, great post!</description>
		<content:encoded><![CDATA[<p>Wow... you're among top google results and you just saved me hours of work... thanks, great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manky.turd</title>
		<link>http://pgl.yoyo.org/bits/tech/bash-variable-variables/100:2008-12-05/comment-page-1/#comment-1656</link>
		<dc:creator>manky.turd</dc:creator>
		<pubDate>Thu, 12 Aug 2010 06:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://pgl.yoyo.org/bits/?p=100#comment-1656</guid>
		<description>nice work balls,  this is bangin!</description>
		<content:encoded><![CDATA[<p>nice work balls,  this is bangin!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

