<div dir="ltr">Oh and thanks for explaining the reasoning behind the curly braces, that can be important in such a situation as you explained.  I often use it because I may do a statement such as:<br><br>for i in `ls *`; do filename=$( echo $i | sed -ie &#39;s/\.*//&#39;); convert $i -geometry 600x480 JPG:${filename}-thumb.jpg; done<div>
<br></div><div>So if you need to have the output of your variable immediately followed by some other string it is important to surround it with the curly braces.  </div><div><br></div><div style>I am sure there are other methods that are a bit easier than what I have done there.  </div>
<div style><br></div><div style>Dan</div><div><div><br></div><div style><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 5:03 PM, Dan Kulinski <span dir="ltr">&lt;<a href="mailto:daniel@kulinski.net" target="_blank">daniel@kulinski.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Marcus, <div><br></div><div>I rushed my explanation and missed something.  You are quite right you can&#39;t force expansion in single quotes.  What you do is something like the following:</div>
<div>
var=&quot;&#39;scale=2;${total}/60&#39;&quot;; echo $var | bc<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Dan</div></font></span></div>
<div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 5:00 PM, marcus hall <span dir="ltr">&lt;<a href="mailto:marcus@tuells.org" target="_blank">marcus@tuells.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Mon, Feb 11, 2013 at 03:27:08PM -0700, Dan Kulinski wrote:<br>
&gt; When you use single quotes you stop variable expansion.  Try double quotes<br>
&gt; or forcing expansion with scale=&#39;2;${total}/60&#39;<br>
&gt;<br>
&gt; Dan<br>
<br>
</div>Double quotes is definately the answer..  But, I don&#39;t understand what<br>
you&#39;re trying to say about &quot;forcing expansion&quot;.<br>
<br>
Try the following:<br>
<br>
xxx=test<br>
<br>
echo $xxx<br>
echo &quot;$xxx&quot;<br>
echo &#39;$xxx&#39;<br>
echo ${xxx}<br>
echo &quot;${xxx}&quot;<br>
echo &#39;${xxx}&#39;<br>
<br>
I think you will find that the single quotes never perform variable<br>
substitutuion.  Where the curly braces are useful are when the variable<br>
is immediately followed by a character that could be part of a variable<br>
name.  For example:<br>
<br>
echo $xxx_yyy<br>
echo ${xxx}_yyy<br>
<br>
The first case tries to expand the variable xxx_yyy, while the second case<br>
expands the variable xxx and follows that expansion with &quot;_yyy&quot;.  Sometimes<br>
it is very important, but usually it is not needed.<br>
<span><font color="#888888"><br>
marcus hall<br>
<a href="mailto:marcus@tuells.org" target="_blank">marcus@tuells.org</a><br>
</font></span><div><div>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>