awk 列计算 awk 'BEGIN{total=0}{total+=$1}END{print total}' 以下为gawk的相关介绍,比较详细,并且比较容易看明白 http://fanqiang.chinaunix.net/program/shell/2005-03-30/3068.shtml 转载于:https://blog.51cto.com/slien/123760