awk累加

{a+=substr($14,1,1)}END{a=(a=="")?0:a;print a}'

对a进行累加,如果最后a=0的话,结果为0,否则为a,最后输出a

原文地址:https://www.cnblogs.com/seasonsstory/p/3147702.html