原帖由 wh21667 于 2008-8-13 17:31 发表
awk -F, '{if($6==1) a($10)+=$5}END{for(name in a) print name,a[name]}' file
怎么用sed实现
原帖由 wh21667 于 2008-8-13 17:44 发表
#! /bin/sed -f
# This is an alternative approach to summing numbers,
# which works a digit at a time and hence has unlimited
# precision. This time it is done with lookup tables,
# and use ...
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |