Sum a column with awk linux

Sum values in column 2 of a text file

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