摘要: 第十二章 正则表达式grep进阶用法export | grep -A3 -B2 'TERM' 把目标的前2行 后3行也显示出来 before after在~/.bashrc中加入alias grep='grep --color=auto' ,并source ~/.bashrc 即可每次都别名生效grep -vn 'the' regular_express.txt 打印不包含the的行 -v 反向搜索grep -n 't[ae]st' regular_express.txt 查找 test 或 tastegrep -n '[ 阅读全文
posted @ 2012-10-17 10:43 iyjhabc 阅读(456) 评论(0) 推荐(0) 编辑