摘要: 转成txt格式最大年龄 1 BEGIN{2 FS="[()]";max=03 }4 {5 if(max<substr($4,6,2)){max=substr($4,6,2);name=substr($1,9)}6 }7 END{8 print max,name9 }综合小例子 1 #!/usr/bin/bash 2 #awk [ -F re] [parameter...] ['prog'] [-f progfile][in_file...] 3 # BEGIN { x=0 }/^$/{ x=x+1 }END{ print "I found & 阅读全文
posted @ 2012-12-06 18:46 hhhyde 阅读(113) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #coding:utf-8 2 logpath='D:/temp2.log' 3 destinationPath='d:/temp.xml' 4 log=open(logpath) 5 # status={}#行数:{节点名:状态(1:不可用,2:可用)} 6 status={}#行数:{节点名:状态(1:不成对begin,2:不成对end,3:成对begin,4:成对end)} 7 content=[] 8 begins=[] 9 index=010 exist={}11 for r in log.readlines():12 inde 阅读全文
posted @ 2012-12-06 18:05 hhhyde 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 结合 apache部署django - 超级管理员 - 博客园编辑apache_django_wsgi.conf:<VirtualHost *:80> #① WSGIScriptAlias / "D:/mysite/apache/django.wsgi" <Directory "D:/mysite"> Allow from all </Directory> <Directory "D:/mysite/templates"> Allow from all </Directory> 阅读全文
posted @ 2012-09-27 20:16 hhhyde 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 性能测试工具AB一般用法是:ab -n 1000 http://127.0.0.1:8000/blog ab是apache自带的一款功能强大的测试工具 安装了apache一般就自带了, 用法可以查看它的说明 $ ./ab ./ab: wrong number of arguments Usage: ./ab [options] [http://]hostname[:port]/path Options are: -n requests Number of requests to perform -c concurrency Number of multiple request... 阅读全文
posted @ 2012-09-26 18:42 hhhyde 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 试一试 阅读全文
posted @ 2012-09-24 18:31 hhhyde 阅读(106) 评论(0) 推荐(0) 编辑