awk 'BEGIN{total=0}{total+=$1}END{print total}' 文件名 转载于:https://www.cnblogs.com/seasonsstory/p/3429600.html