感觉awk判断语句像是乱序的,这一周学习awk总结
grep "all_time" log/bn-as.log | head -4000 |
grep -o baidu_id="[a-z|A-Z|0-9_]*"| awk -F ‘=‘ ‘{if($2 != "") print $2 >> "output_lyning" }‘
grep "provider=common" log/bn-bs.log | head -40000 | grep "is_hit_cache=0" |
grep -o "all_time=[0-9]*" | awk -F ‘=‘ ‘{sum+=$2; count+=1} END{print sum/count}‘
grep "provider=common" log/bn-bs.log | head -40000 | grep "is_hit_cache=0" | wc -l
awk抓取数据
时间: 2024-10-11 08:44:52