- 论坛徽章:
- 0
|
- #!/bin/sh
- case "$1" in
- '1')
- cat $2|grep "tencent.com"|awk '{print $1,$3,$4,$5,$7,$8,$9,$13,$14}'|sort|uniq|less
- ;;
- '2')
- cat $2|grep "tencent.com"|awk '{print $1}'|sort|uniq|less
- ;;
- '3')
- cat $2 |awk '{if ( match($7,".*\.messenger\.msn\.com") || match($7,".*\.passport\.com") || match($7,".*\.voice\.microsoft\.com") ) print $1,$3,$4,$5,$7,$8,$9,$13,$14}'|sort|uniq|less
- ;;
- '4')
- cat $2 |awk '{if ( match($7,".*\.messenger\.msn\.com") || match($7,".*\.passport\.com") || match($7,".*\.voice\.microsoft\.com") ) print $1}'|sort|uniq|less
- ;;
- *)
- echo "使用方法 $0 [1|2|3|4] 日志名"
- echo "1为详细查看oicq,"
- echo "2为简单查看oicq,"
- echo "3为详细查看msn,"
- echo "4为简单查看msn,"
- echo "例如 filter_log 1 test.log"
- echo "移动用方向键,ctrl+F,ctrl+B翻页,q退出"
- ;;
- esac
- exit 1
复制代码 |
|