本文共 708 字,大约阅读时间需要 2 分钟。
#grep huawei_result lh0.log|grep result_code > all_lh.txt #grep huawei_result lh1.log|grep result_code >> all_lh.txt #grep huawei_result lh2.log|grep result_code >> all_lh.txt #grep huawei_result lh3.log|grep result_code >> all_lh.txt #grep huawei_result lh4.log|grep result_code >> all_lh.txt #grep huawei_result lh5.log|grep result_code >> all_lh.txt #grep huawei_result lh6.log|grep result_code >> all_lh.txt #grep huawei_result lh7.log|grep result_code >> all_lh.txt #grep huawei_result lh8.log|grep result_code >> all_lh.txt #grep huawei_result lh9.log|grep result_code >> all_lh.txt cat all_lh.txt |awk ' { cnt[$0]++ } END{ printf(" 统计重复日志\n"); for( any in cnt ) { printf("%s\t%s\n",any,cnt[any]) } } '转载地址:http://wnvwn.baihongyu.com/