<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 style>In my research I found echo &#39;scale=2;87/60&#39; | bc</div><div style>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 style><br></div><div style><div>bash-4.1$ echo &#39;scale=2;$total/60&#39; | bc</div><div>(standard_in) 1: illegal character: $</div><div><br></div><div style>(scratches head)</div><div style><br></div><div style>Mike</div>
</div></div>