linux – 回显sdout和stderr

前端之家收集整理的这篇文章主要介绍了linux – 回显sdout和stderr前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我有一个非常简单的问题:
如何从shell脚本回显到stdout和stderr?
我知道我可以回应stderr echo“foo”1>& 2但我需要输出两者.
我尝试了一些谷歌搜索,但没有任何效果.

最佳答案
这应该做到这一点

 echo "foo" | tee /dev/stderr 
原文链接:https://www.f2er.com/linux/440567.html

猜你在找的Linux相关文章