巴什饮食stderr输出 [英] Bash eating stderr output
本文介绍了巴什饮食stderr输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我打电话的命令行工具,我们从OS X的bash写,我有,我没有得到stderr输出,但只有公司的printf写入stdout的问题。
I'm calling a command line tool we wrote from bash on OS X and I have the problem that I don't get the stderr output but only printf's written to stdout.
这是我的电话:
echo "someInputString" |theTool -v someArg
我也试过:
echo "someInputString" |theTool -v someArg 2>&1
没有成功...
我敢打赌,这是微不足道的,但我不知道需要做什么。
在此先感谢!
without success... I bet it's trivial but I don't know what needs to be done. Thanks in advance!
推荐答案
重定向stderr流输出 2方式>
Redirect the stderr stream output with 2>
.
echo "someInputString" |theTool -v someArg 2> error_file
这篇关于巴什饮食stderr输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文