摘要:
正则表达式的应用正则表达式是用来处理字串的一种工具,和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
智慧的老鸟
阅读(247)
评论(0)
推荐(0)

浙公网安备 33010602011771号