awk

Only display column 1

awk '{print $1}'

SUM all number at position 1 in a file:

awk '{s+=$1} END {print s}' mydatafile
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License