Conservative. Idaho. Software engineer. Historian. Trying to prevent Idiocracy from becoming a documentary.
Email complaints/requests about copyright infringement to clayton @ claytoncramer.com. Reminder: the last copyright troll that bothered me went bankrupt.
"And we know that all things work together for good to them that love God, to them who are the called according to his purpose." -- Rom. 8:28
Bash variable substitution doesn't happen in '-quoted strings.
ReplyDeleteUse:
y=1.0
y=`echo "$y +0.5"|bc -l`
This resulted in 1.5 for me:
ReplyDeletey=1.0; y=$(echo "$y+0.5" | bc -l ); echo $y