输出一个日志的第 10 列
cat /data/logs/dataInsert/dataInsert.log|grep “total insert count :”|awk ‘{print $10}’
统计日志的第 10 列的和
cat /data/logs/dataInsert/dataInsert.log|grep “total insert count :”|awk ‘BEGIN {size=0;} {size=size+$10;} END{print “[end]size is “, size}’
awk ‘BEGIN {size=0;} {size=size+$10;} END{print “[end]size is “, size}’