grep: highlighting matches in color
来源:互联网 发布:多普达 知乎 编辑:程序博客网 时间:2024/06/06 01:47
Many Debian users use grep regularly. But did you know that grep can highlight the text it matches in color?
Much like ls, grep supports the use of color in its output, controlled by a --color option. By default, grep outputs matching lines, but does not indicate what portion of the line matched. With --color=auto, grep will highlight the matching portion of the line in color when it outputs to a terminal, while avoiding the use of any potentially-harmful terminal control sequences when standard output goes somewhere else (like a file or pipe). If you like the colorful grep, you can simply export GREP_OPTIONS='--color=auto'
in your shell startup script.
grep's default highlight uses a red color. You can change this color by setting the GREP_COLOR
environment variable to a different escape sequence fragment. I use export GREP_COLOR='1;32'
, which produces a bright green.
https://debian-administration.org/article/460/grep_highlighting_matches_in_color
- grep: highlighting matches in color
- Highlighting Rows in an ASP.Net DataGrid...
- syntax highlighting in LESS command on Ubuntu
- grep:Binary file (standard input) matches
- grep:Binary file (standard input) matches
- grep returns Binary file (standard input) matches
- grep:Binary file (standard input) matches
- grep:Binary file (standard input) matches
- grep:Binary file (standard input) matches
- grep:Binary file (standard input) matches
- grep:Binary file (standard input) matches
- syntax highlighting when editing your .cu files in Visual Studio
- Highlighting the Current Page in a Navigating Bar
- How to enable syntax highlighting and other options in VIM
- grep的时候Binary file (standard input) matches 怎么解决?
- Linux命令:grep,报错Binary file (standard input) matches
- grep一个文件时,报错“Binary file ... matches”
- grep的时候Binary file (standard input) matches
- iOS之热修复WaxPatch
- spring boot 学习笔记(2)--@PathVariable @RequestParam @GetMapping @PostMapping
- 爬虫 斗鱼 直播
- laravel队列发送邮件报错
- 关于bigdecimal和double和float的一些理解
- grep: highlighting matches in color
- EjB是什么
- ES合并操作小结
- 数据库访问工具 DBUtl
- java 使用TreeSet将字符串中的数值进行排序
- React.js 中的组件通信问题
- spring定时器注解的用法详解
- 支付宝支付
- C#进阶5_多态