摘要: linux 内核版本:[root@master-1-1 webapps]# uname -aLinux master-1-1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linu... 阅读全文
posted @ 2015-03-29 16:56 cheerong 阅读(2000) 评论(0) 推荐(0) 编辑
摘要: python中命令行参数和shell不一样,是通过sys.argv[]来获取的,sys.argv[0]是代码文件本身的路径,因此参数是从1开始的,例子:#!/usr/bin/env pythonimport osimport jsonimport os, sys#t=os.popen("""nets... 阅读全文
posted @ 2015-02-05 16:46 cheerong 阅读(500) 评论(0) 推荐(0) 编辑
摘要: # _*_ coding: cp936 _*_ //支持中文格式import sys import getpass#admin configurationusername='cheeron'password='1234'counter = 0 #认证登录while True: if coun... 阅读全文
posted @ 2015-02-02 22:15 cheerong 阅读(732) 评论(0) 推荐(0) 编辑
摘要: [root@cheeron lesson1]# cat user.txt1 cheeron python 40998222 forilen shell 123098653 XueLi JS 43217804 LiLei IT 483930225 Simith IT 23409876 Liudehua... 阅读全文
posted @ 2015-02-01 21:27 cheerong 阅读(497) 评论(0) 推荐(0) 编辑
摘要: break结束整个循环for num in range(0,10): if num==6: break print num以上循环将会打印出0、1、2、3、4、5continue结束本次循环,立即开始下一次循环for num in range(0,10): if num==6: c... 阅读全文
posted @ 2015-01-28 22:38 cheerong 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1、导入模块:import osfrom os import systemimport SocketServer as SS --别名2、使用Tab键:[root@cheeron python]# cat tab.py#python startup fileimport sysimport read... 阅读全文
posted @ 2015-01-25 21:05 cheerong 阅读(202) 评论(0) 推荐(0) 编辑
摘要: sed 命令:echo "I am oldboy,my qq is 1234567" >>oldboy.txt要求:1、取出oldboy.txt 文件中的oldboy字符串方法一:[root@git oldboy]# echo "I am oldboy,my qq is 1234567">oldbo... 阅读全文
posted @ 2014-11-30 18:48 cheerong 阅读(195) 评论(0) 推荐(0) 编辑