awk will be cleaner, simpler, and faster -
awk '{ printf "%.2f\n", $1/1024/1024/1024; }' file.log 2.02 1.58 1.85
bc needs a loop, and doesn't round properly.
$: while read b > do bc <<< "scale=2; $b / 1024^3" # shouldn't GB be ^3? > done < file.log 2.02 1.57 1.84
You can get the rounding with printf and another layer of subshell...
Drop the scale and use bc -l:
$: while read b; do printf '%.2f\n' $(bc -l<<<"$b/1024^3"); done < file.log 2.02 1.58 1.85
or some program to format lines of your file into commands for bc in place of the loop, which eliminates a separate call to bc for every line of your file -
$: printf '%.2f\n' $( sed 's,$,/1024^3,' tmp | bc -l ) 2.02 1.58 1.85
...but I'd just use the awk.
edit --
New upvote made me look at this again. Comment elsewhere is inaccurate, but has a valid point.
I am converting to gibibytes, which are powers of two, rather than gigabytes, which are powers of ten. I assumed that was what was wanted, because of the technically incorrect usage in prevalence.
If OP actually meant they wanted powers of 10 instead of two, just switch the 1024's to 1000's -
awk '{for (i = 1; i <= NF; i++) $i = ($i/(1000*1000*1000)); print }' file.log
...though I doubt that's what they meant, it is good to be clear, specific, and accurate.
file.log?