输出匹配项:grep
2017-05-29 09:43
148 查看
命令格式:
When grep encounters a “pattern” in the file, it prints out the lines containing it.
也就是说,grep 命令的功能是,如果 file 中存在于 pattern 匹配的项,则输出。举例说明:
会得到如下结果:
grep pattern [file...]
When grep encounters a “pattern” in the file, it prints out the lines containing it.
也就是说,grep 命令的功能是,如果 file 中存在于 pattern 匹配的项,则输出。举例说明:
ls /bin /usr/bin | sort | uniq | grep zip
会得到如下结果:
bunzip2 bzip2 gunzip gzip unzip zip zipcloak zipgrep zipinfo zipnote zipsplit
相关文章推荐
- linux grep 查找 匹配 内容的文件 且 输出 文件名
- 小技巧:如何在某命令的帮助输出信息里(usage)用grep查找关键字(错误输出重定向到标准输出)
- 浅谈grep命令查找匹配内容的使用、参数、正则
- sed awk grep 同时匹配多个条件
- C#之字符匹配输出
- ps -ef |grep xxx 输出的具体含义
- 用sed、awk、grep同时匹配多个条件(与模式、或模式)
- 设置grep高亮显示匹配项
- grep "5.0" test.txt 匹配问题
- grep-----linux查看打印匹配的下几行或前后几行的命令
- [小知识] grep中如何使用正则表达式匹配数字
- HDU - 2819 Swap (二分匹配+输出路径)
- ***ps -ef |grep 输出的具体含义是什么?
- grep命令输出带颜色展示
- grep 匹配 sed 匹配 sed 替换 awk 匹配 awk 条件操作符 awk 内置变量 运算
- HDU 2819 Swap (最大二分匹配+输出路径)
- Grep模式匹配的正则表达式
- Linux grep命令中两种前缀匹配
- ps -ef |grep 输出的具体含义
- 输出匹配行