1亿个ip取频率最高的k个time awk '{++a[$2]}END{for(e in a){print a[e],e}}' xx | sort -rnk1 | head -nk
随机取出100个数:grep -v "用户" spam.sort | awk 'BEGIN{v=100/2700050}{if(rand()<v) print $0}' | wc -l