首页 > 技术文章 > linux对文件某列求和

andashu 2017-02-17 15:21 原文

对文件某列求和:

-F,用,号分隔,求第3行的和

awk -F,  '{sum += $3};END {print sum}' test

 

推荐阅读