<div dir="ltr">When you use single quotes you stop variable expansion.  Try double quotes or forcing expansion with scale=&#39;2;${total}/60&#39;<div><br></div><div style>Dan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Feb 11, 2013 at 3:24 PM, Mike Bean <span dir="ltr">&lt;<a href="mailto:beandaemon@gmail.com" target="_blank">beandaemon@gmail.com</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">I&#39;ve got a script I&#39;m trying to finish, the problem in a nutshell however is that bash appears to treat all arithmatic as real numbers/integers, and while I don&#39;t need accuracy down to the 10th place, down the 2nd place would be nice.<div>

<br></div><div>In my research I found echo &#39;scale=2;87/60&#39; | bc</div><div>which works well, however the problem is I&#39;m not going to know the first term, I&#39;ve got to be able to pass it a variable, and all attemptse to date have resulted in:</div>

<div><br></div><div><div>bash-4.1$ echo &#39;scale=2;$total/60&#39; | bc</div><div>(standard_in) 1: illegal character: $</div><div><br></div><div>(scratches head)</div><span class="HOEnZb"><font color="#888888"><div><br>
</div><div>Mike</div>
</font></span></div></div>
<br>_______________________________________________<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></blockquote></div><br></div>