上一页 1 2 3 4 5 6 7 8 ··· 30 下一页
摘要: 循环中的重定向或许你应该在其他脚本中见过下面的这种写法:while read linedo …done < file刚开始看到这种结构时,很难理解< file是如何与循环配合在一起工作的。因为循环内有... 阅读全文
posted @ 2017-11-01 15:50 cn_wk 阅读(370) 评论(0) 推荐(0)
摘要: class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' ... 阅读全文
posted @ 2017-10-25 19:49 cn_wk 阅读(193) 评论(0) 推荐(0)
摘要: 转载自http://blog.csdn.net/misakaqunianxiatian/article/details/52263564情况1:在centOS或debian等Unix系统上,使用vim编辑文件时,... 阅读全文
posted @ 2017-10-18 13:37 cn_wk 阅读(92) 评论(0) 推荐(0)
摘要: linux shell 配置文件中默认的字符集编码为UTF-8 。UTF-8是unicode的一种表达方式,gb2312是和unicode都是字符的编码方式,所以说gb2312跟utf-8的概念应该不是一个层次上... 阅读全文
posted @ 2017-10-18 13:35 cn_wk 阅读(314) 评论(0) 推荐(0)
摘要: 一、数值类型(int、float)# %d、%f是占位符>>> a = 3.1415926>>> print("%d"%a) #%d只能输出整数,int类3>>> print("%f"%a) #%f输出... 阅读全文
posted @ 2017-10-17 19:44 cn_wk 阅读(200) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/21129020/how-to-fix-unicodedecodeerror-ascii-codec-cant-decode-byte ... 阅读全文
posted @ 2017-10-17 11:13 cn_wk 阅读(31) 评论(0) 推荐(0)
摘要: Linux进程状态解析之R、S、DLinux是一个分时操作系统,能够在一个cpu上运行多个程序,每个被运行的程序实例对应一个或多个进程,这里介绍一下Linux进程状态。作者:佚名来源:CSDN|2010-03-0... 阅读全文
posted @ 2017-10-17 11:08 cn_wk 阅读(625) 评论(0) 推荐(0)
摘要: while read line 与for循环的区别 ---转载整理while read line 是一次性将文件信息读入并赋值给变量line ,while中使用重定向机制,文件中的所有信息都被读入并重定向给了整个... 阅读全文
posted @ 2017-10-15 22:09 cn_wk 阅读(106) 评论(0) 推荐(0)
摘要: cut echo "x:xx:xxx" | cut -d ":" -f 2uniqcat file0 | sort | uniqawkecho "x:xx:xxx" | awk -F ":" '{for(i=1;... 阅读全文
posted @ 2017-10-15 21:53 cn_wk 阅读(32) 评论(0) 推荐(0)
摘要: commandline和GUI下的clipboard的交互Mac下echo $PATH | pbcopy,copy to clipboardecho "$(pbpaste -Prefer text)",copy ... 阅读全文
posted @ 2017-10-09 00:51 cn_wk 阅读(247) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 30 下一页