过滤部分错误信息,不输出到stderr
cmd 2>/tmp/stderr.log
cat /tmp/stderr.log | grep -v “要过滤信息的关键字” >&2
rm /tmp/stderr.log
Your future depends on your dreams. So go to sleep.
cmd 2>/tmp/stderr.log
cat /tmp/stderr.log | grep -v “要过滤信息的关键字” >&2
rm /tmp/stderr.log