【发布时间】:2012-06-20 16:44:13
【问题描述】:
Bash 如何将 stderr 捕获到变量中?
我想在我的 bash 脚本中做这样的事情
sh -c path/myExcecutable-bin 2>&1 =MYVARIABLE
如何将 stderror 输出发送到变量?
【问题讨论】:
-
这个 StackOverflow thread 应该回答你的问题。
-
查看众多相关主题之一,以及several solutions