上一页 1 ··· 207 208 209 210 211 212 213 214 215 ··· 342 下一页
摘要: 阅读全文
posted @ 2014-04-02 12:59 emanlee 阅读(599) 评论(0) 推荐(0)
摘要: echo "Cfoo'barxml" | sed "s/'/::/g" | sed 's/::/\\:/g' | sed "s/:/'/g" 替换单引号为 \'------------------------sed 替换单引号'echo "mmm'sss" > testcat test把test内容... 阅读全文
posted @ 2014-03-24 15:03 emanlee 阅读(28981) 评论(4) 推荐(0)
摘要: 双引号:awk '{print "\""}' #放大:awk '{print " \" "}'使用“”双引号把一个双引号括起来,然后用转义字符\对双引号进行转义,输出双引号。单引号:awk '{print "'\''"}' # 放大: awk '{print " ' \ ' ' " }'使用一个双引... 阅读全文
posted @ 2014-03-24 14:30 emanlee 阅读(49511) 评论(0) 推荐(1)
摘要: Sys.Date( ) returns today's date. 显示当前日期date() returns the current date and time. 显示当前日期和时间# print today's datetoday <-Sys.Date()format(today, format= 阅读全文
posted @ 2014-03-22 18:53 emanlee 阅读(23340) 评论(0) 推荐(0)
摘要: import os os.path.isfile('test.txt') # 如果不存在就返回False os.path.exists(directory) # 如果目录不存在就返回Falseos.makedirs(targetDir) os.path.join(targetDir, fi... 阅读全文
posted @ 2014-03-21 21:25 emanlee 阅读(842) 评论(0) 推荐(0)
摘要: 生成字符串变量str='python String function' 字符串长度获取:len(str)例:print '%s length=%d' % (str,len(str))连接字符串sStr1 = 'strcat'sStr2 = 'append'sStr1 += sStr2print sS 阅读全文
posted @ 2014-03-21 21:20 emanlee 阅读(40574) 评论(1) 推荐(4)
摘要: 1.格式化输出整数python print也支持参数格式化,与C言的printf似,strHello = "the length of (%s) is %d" %(Hello World,len(Hello World))print strHello#输出果:the length of (Hello... 阅读全文
posted @ 2014-03-21 18:57 emanlee 阅读(856) 评论(0) 推荐(0)
摘要: 环境:Windows XP + Word 2003 + EndNote 6 以下各方法可以依次试一下,需要重启Word后才能看到是否可行。1 视图 -- 工具栏 -- EndNote,是否打勾。2 word 里 endnote 无法加载,把 C:\Program Files\EndNote X6\Product-Support\CWYW 里的 endnote cwyw.dot 和 endnote cwyw.dotm 这两个文件拷到 C:\Program Files\Microsoft Office\OFFICE11\STARTUP(不同的电脑路径不同)文件夹下。需要重启Word后才能看到是否可 阅读全文
posted @ 2014-03-08 22:53 emanlee 阅读(30358) 评论(1) 推荐(0)
摘要: # 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l # 查看每个物理CPU中 阅读全文
posted @ 2014-03-08 10:05 emanlee 阅读(843041) 评论(16) 推荐(52)
摘要: 1、rpm包安装的,可以用 rpm -qa 看到,如果要查找某软件包是否安装,用 rpm -qa | grep "软件或者包的名字"2、以deb包安装的,可以用 dpkg -l 看到。如果是查找指定软件包,用 dpkg -l | grep "软件或者包的名字"3、yum方法安装的,可以用 yum l... 阅读全文
posted @ 2014-03-07 21:55 emanlee 阅读(19695) 评论(0) 推荐(1)
上一页 1 ··· 207 208 209 210 211 212 213 214 215 ··· 342 下一页