相关疑难解决方法(0)

如何为grep输出着色

当我打字

memcached -vv 2>&1 | grep --color=always "SET\|GET"
Run Code Online (Sandbox Code Playgroud)

我得到了不错的 memcached 统计数据

获取 AR-City-1

GET rest-part-241

SET rest-part-241 值 len 为 685

GET main-rest-list-1

将其通过管道传输到某些东西会很棒,并且颜色GET为绿色而不是默认的红色。

我怎么能那样做?

linux bash

6
推荐指数
1
解决办法
7203
查看次数

有什么方法可以为 Linux 命令的输出着色?

我对 Linux 有点陌生,但我猜你可以将程序的输出传递给特定的脚本,并根据一些正则表达式(可能是从某种配置文件构建的)以各种颜色显示它)。

linux command-line colors

5
推荐指数
1
解决办法
1978
查看次数

标签 统计

linux ×2

bash ×1

colors ×1

command-line ×1