awk处理字符串
来源:互联网 发布:哈登场均数据 编辑:程序博客网 时间:2024/04/29 18:33
180.153.114.199 - - [03/Jul/2013:14:44:43 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Fplugin-install.php%3Ftab%3Dsearch%26s%3DVasiliki%26plugin-search-input%3D%25E6%2590%259C%25E7%25B4%25A2%25E6%258F%2592%25E4%25BB%25B6&reauth=1 HTTP/1.1 200 2355 - Mozilla/4.0 -
101.226.33.200 - - [03/Jul/2013:14:45:52 +0800] GET /wp-admin/plugin-install.php?tab=search&type=term&s=Photogram&plugin-search-input=%E6%90%9C%E7%B4%A2%E6%8F%92%E4%BB%B6 HTTP/1.1 302 0 - Mozilla/4.0 -
101.226.33.200 - - [03/Jul/2013:14:45:52 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Fplugin-install.php%3Ftab%3Dsearch%26type%3Dterm%26s%3DPhotogram%26plugin-search-input%3D%25E6%2590%259C%25E7%25B4%25A2%25E6%258F%2592%25E4%25BB%25B6&reauth=1 HTTP/1.1 200 2370 - Mozilla/4.0 -
113.110.176.131 - - [03/Jul/2013:15:03:57 +0800] GET /wp-content/themes/catjia-lio/images/menu_hover_bg.png HTTP/1.1 304 0 http://demo.catjia.com/wp-content/themes/catjia-lio/style.css Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 -
180.153.205.103 - - [03/Jul/2013:15:13:59 +0800] GET /wp-admin/options-general.php HTTP/1.1 302 0 - Mozilla/4.0 -
180.153.205.103 - - [03/Jul/2013:15:13:59 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Foptions-general.php&reauth=1 HTTP/1.1 200 2269 - Mozilla/4.0 -
101.226.51.227 - - [03/Jul/2013:15:14:07 +0800] GET /wp-admin/options-general.php?settings-updated=true HTTP/1.1 302 0 - Mozilla/4.0 -
101.226.51.227 - - [03/Jul/2013:15:14:07 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Foptions-general.php%3Fsettings-updated%3Dtrue&reauth=1 HTTP/1.1 200 2291 - Mozilla/4.0 -
awk '{a[$1]+=1;}END{for(i in a){print a[i]" "i;}}' test.log
awk '{a[$1]+=1;}END{for(i in a){print a[i]" "i;}}' test.log | sort -g
cat /etc/passwd | awk -F ':' '{print $1" "$7}'
cat /etc/passwd | awk -F ':' 'BEGIN{print "name,shell"}{print $1" "$7}'
cat /etc/passwd | awk -F ':' 'BEGIN{print "name,shell"}{print $1" "$7} END{print "this,end"}'
awk '{print $1}' test.log|sort|uniq|wc -l
cut -d- -f 1 test.log |uniq -c | sort -rn | head -20
101.226.33.200 - - [03/Jul/2013:14:45:52 +0800] GET /wp-admin/plugin-install.php?tab=search&type=term&s=Photogram&plugin-search-input=%E6%90%9C%E7%B4%A2%E6%8F%92%E4%BB%B6 HTTP/1.1 302 0 - Mozilla/4.0 -
101.226.33.200 - - [03/Jul/2013:14:45:52 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Fplugin-install.php%3Ftab%3Dsearch%26type%3Dterm%26s%3DPhotogram%26plugin-search-input%3D%25E6%2590%259C%25E7%25B4%25A2%25E6%258F%2592%25E4%25BB%25B6&reauth=1 HTTP/1.1 200 2370 - Mozilla/4.0 -
113.110.176.131 - - [03/Jul/2013:15:03:57 +0800] GET /wp-content/themes/catjia-lio/images/menu_hover_bg.png HTTP/1.1 304 0 http://demo.catjia.com/wp-content/themes/catjia-lio/style.css Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 -
180.153.205.103 - - [03/Jul/2013:15:13:59 +0800] GET /wp-admin/options-general.php HTTP/1.1 302 0 - Mozilla/4.0 -
180.153.205.103 - - [03/Jul/2013:15:13:59 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Foptions-general.php&reauth=1 HTTP/1.1 200 2269 - Mozilla/4.0 -
101.226.51.227 - - [03/Jul/2013:15:14:07 +0800] GET /wp-admin/options-general.php?settings-updated=true HTTP/1.1 302 0 - Mozilla/4.0 -
101.226.51.227 - - [03/Jul/2013:15:14:07 +0800] GET /wp-login.php?redirect_to=http%3A%2F%2Fdemo.catjia.com%2Fwp-admin%2Foptions-general.php%3Fsettings-updated%3Dtrue&reauth=1 HTTP/1.1 200 2291 - Mozilla/4.0 -
awk '{a[$1]+=1;}END{for(i in a){print a[i]" "i;}}' test.log
awk '{a[$1]+=1;}END{for(i in a){print a[i]" "i;}}' test.log | sort -g
cat /etc/passwd | awk -F ':' '{print $1" "$7}'
cat /etc/passwd | awk -F ':' 'BEGIN{print "name,shell"}{print $1" "$7}'
cat /etc/passwd | awk -F ':' 'BEGIN{print "name,shell"}{print $1" "$7} END{print "this,end"}'
awk '{print $1}' test.log|sort|uniq|wc -l
cut -d- -f 1 test.log |uniq -c | sort -rn | head -20
0 0
- awk处理字符串
- awk字符串处理
- awk常用字符串处理函数
- awk 字符串与算数处理
- awk 处理
- linux下字符串处理工具二:awk(1)
- linux下字符串处理工具二:awk( 二),awk脚本
- awk 字符串函数
- awk脚本字符串连接
- awk字符串比较问题
- awk 字符串拼接
- awk内置字符串函数
- awk字符串函数
- awk 截取字符串
- awk字符串截取
- awk内置字符串函数
- awk截取字符串
- awk截取字符串
- Swift:闭包(Closures)
- 有三个学⽣生,编程找出分数最⾼者以及年龄最小者
- Grunt--Less
- WebService开发1
- 陈公公找女友
- awk处理字符串
- 实现android的 google第三方登陆!
- iOS 应用内付费(IAP)开发步骤一:填写相关的税务,银行,联系人信息;
- Java Web项目中web.xml中默认首页访问的是:WebContent目录下的文件
- 真正的成长
- Gonet2 游戏服务器框架解析之Agent(3)
- AngularJs动态增减class样式——ng-class
- ubuntu切换中文语言
- 怎样在几何画板中调节相交圆