会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
wangke-tech
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
···
30
下一页
2017年11月1日
[shell]while read line do done < file
摘要: 循环中的重定向或许你应该在其他脚本中见过下面的这种写法:while read linedo …done < file刚开始看到这种结构时,很难理解< file是如何与循环配合在一起工作的。因为循环内有...
阅读全文
posted @ 2017-11-01 15:50 cn_wk
阅读(370)
评论(0)
推荐(0)
2017年10月25日
[Python]控制终端输出文字
摘要: class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' ...
阅读全文
posted @ 2017-10-25 19:49 cn_wk
阅读(193)
评论(0)
推荐(0)
2017年10月18日
[encode]vim中文乱码
摘要: 转载自http://blog.csdn.net/misakaqunianxiatian/article/details/52263564情况1:在centOS或debian等Unix系统上,使用vim编辑文件时,...
阅读全文
posted @ 2017-10-18 13:37 cn_wk
阅读(92)
评论(0)
推荐(0)
[encode]iconv文件编码转换
摘要: linux shell 配置文件中默认的字符集编码为UTF-8 。UTF-8是unicode的一种表达方式,gb2312是和unicode都是字符的编码方式,所以说gb2312跟utf-8的概念应该不是一个层次上...
阅读全文
posted @ 2017-10-18 13:35 cn_wk
阅读(314)
评论(0)
推荐(0)
2017年10月17日
[python]打印对齐
摘要: 一、数值类型(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)
[python]编码问题 待整理
摘要: 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]Linux进程状态解析之R、S、D
摘要: Linux进程状态解析之R、S、DLinux是一个分时操作系统,能够在一个cpu上运行多个程序,每个被运行的程序实例对应一个或多个进程,这里介绍一下Linux进程状态。作者:佚名来源:CSDN|2010-03-0...
阅读全文
posted @ 2017-10-17 11:08 cn_wk
阅读(625)
评论(0)
推荐(0)
2017年10月15日
[shell]while read line 与 for循环的区别
摘要: while read line 与for循环的区别 ---转载整理while read line 是一次性将文件信息读入并赋值给变量line ,while中使用重定向机制,文件中的所有信息都被读入并重定向给了整个...
阅读全文
posted @ 2017-10-15 22:09 cn_wk
阅读(106)
评论(0)
推荐(0)
[shell]字符串处理
摘要: 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)
2017年10月9日
[shell]输出内容到剪切板
摘要: 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
下一页
公告