VARIABLE=$(for time in ...; do ...; done)
results=() for time in ${seconds_list}; do results+=($(bc -l <<< "scale=2; ($cur_time-$time)/3600")) done # print the results: printf "%s " "${results[@]}"