Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一目了然地将标准输出输出与来自我正在调试的 Bash 脚本的标准错误输出区分开来。
我是否可以通过一些“可视化增强器”UNIX 过滤器来传递命令,该过滤器至少会将 stderr 着色为“红色”,即使没有在每个 stderr 行前添加一些标签?
好吧,有几个选择。最简单的方法是使用hilite。
其他选项包括编写自定义 shell 包装器来为输入着色。
这里有几个选项(请注意,它们几乎是特定于 xterm 的)。