智慧的老鸟

一个程序员需要有一棵Gank的心,Dota能培养我。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年10月19日

摘要: 正则表达式的应用正则表达式是用来处理字串的一种工具,和bash一样重要,是学习linux的人通二脉。举个例子:grep命令去你的~/.bashrc 文件中加入alias grep='grep --color=auto',这样你grep是高亮的。例子1 查网卡信息dmesg | grep -n -A3 -B2 'eth'例子2 查文件中的信息grep -n 'the' test.txt //从刚刚的文件当中取得 the 这个特定字串grep -vn 'the' test.txt //当该行没有 'the' 这个字串时 阅读全文
posted @ 2012-10-19 16:41 智慧的老鸟 阅读(234) 评论(0) 推荐(0) 编辑