<div dir="ltr">Marcus, <div><br></div><div style>I rushed my explanation and missed something. You are quite right you can't force expansion in single quotes. What you do is something like the following:</div><div style>
var="'scale=2;${total}/60'"; echo $var | bc<br></div><div style><br></div><div style>Dan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 5:00 PM, marcus hall <span dir="ltr"><<a href="mailto:marcus@tuells.org" target="_blank">marcus@tuells.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Feb 11, 2013 at 03:27:08PM -0700, Dan Kulinski wrote:<br>
> When you use single quotes you stop variable expansion. Try double quotes<br>
> or forcing expansion with scale='2;${total}/60'<br>
><br>
> Dan<br>
<br>
</div>Double quotes is definately the answer.. But, I don't understand what<br>
you're trying to say about "forcing expansion".<br>
<br>
Try the following:<br>
<br>
xxx=test<br>
<br>
echo $xxx<br>
echo "$xxx"<br>
echo '$xxx'<br>
echo ${xxx}<br>
echo "${xxx}"<br>
echo '${xxx}'<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 "_yyy". Sometimes<br>
it is very important, but usually it is not needed.<br>
<span class="HOEnZb"><font color="#888888"><br>
marcus hall<br>
<a href="mailto:marcus@tuells.org">marcus@tuells.org</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">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>