-
The pipe only connects the
stdout of make to the stdin of grep. make's stderr is still connected to the terminal in will therefore be printed without filtering. -
The solution is connect
make's stderr to its stdin and ignore the stdin 示例:
$ make 2>&1 >/dev/null | grep -i 'warning: someone set up us the bomb'
Grep 抓不到make 输出
最新推荐文章于 2022-12-03 14:00:47 发布