摘要: sed 能实现grep查找的功能,还可以替换指定的字符。 匹配查找文件中root字符(其中的 -n表示段落,p表示打印出来print) [root@localhost sed]# sed -n '/root/'p test.txt root:x:0:0:root:/root:/bin/bash op 阅读全文
posted @ 2018-01-16 22:27 zhaocundang 阅读(490) 评论(0) 推荐(0) 编辑