bc: get the sum of a list of num
You can use grep + paste + bc
$ grep -oE '[0-9]+' file
10
10
20
20
20
$ grep -oE '[0-9]+' file | paste -s -d + -
10+10+20+20+20
$ grep -oE '[0-9]+' file | paste -s -d + - | bc
80
instead grep, you can use cut
$ cut -c 8- file
or just awk
$ awk '{print $NF}' file
BUT if you can use awk, you can sum using awk
$ awk '{total += $NF} END { print total }' file