Sum a column with awk

Sum values in column 2 of a text file

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

tool
linux133 commands
tags
linux

More linux commands

all 133 linux commands