Awk — sum a column linux

Sum the 3rd column of a space-delimited text file

awk '{sum += $3} END {print sum}' file.txt