for i in {0..9} do    T=$(bc<<<8+$i*0.5)    echo $Tdone  I get :syntax error near unexpected token `T=$(bc<<<8+$i*0.5)'I believe the problem is the $i. What am I doing wrong?
use loop variable for calculation bash
linux;bash;bc;syntax
The problem is not $i, the problem is in your for construct syntax. You need a newline or ; before do (if used right after the for declaration):for i in {0..9}; do    T=$(bc <<<8+$i*0.5)    echo $Tdone Orfor i in {0..9} do    T=$(bc <<<8+$i*0.5)    echo $TdoneFor clarity, it's better to use whitespace before the here string (<<<) (and similar).Although not strictly necessary in this case, you should quote your variable expansions.