摘要: sed 's/pattern/replace_string/' file:替换文本中第一个匹配的字符串 此处定界符为/,也可以使用任意定界符,比如此处语句也可以写成sed 's:pattern:replace_string:' file 当定界符出现在字符串中时需要进行转义,比如sed 's/pat 阅读全文
posted @ 2017-06-15 20:38 爱上咖啡的唐 阅读(136) 评论(0) 推荐(0) 编辑
摘要: grep 字符串 file1.fileN:从多个文件中匹配字符串的行数据 grep 字符串 file1 --color=auto:匹配的字符串用不同颜色凸显 grep -E 正则表达式 file:使用正则表达式匹配(或者egrep 正则表达式 file注意是egrep不是grep) grep -v 阅读全文
posted @ 2017-06-15 20:37 爱上咖啡的唐 阅读(567) 评论(0) 推荐(0) 编辑