Bash: tree direction in sub-shell working incorrectly

孤人 提交于 2020-01-15 10:48:49

问题


I tested this on a CentOS machine a while back and it worked nicely. Now on another machine, I try this and it fails to work. What is incorrect?

command 2> >(tee stderr.log >&2) && exit

I get this message back.

sh: syntax error near unexpected token `>'

Any suggestions?


回答1:


The answer is in the error message. The traditional Bourne shell (sh) doesn't support process substitution (e.g. >(command)). You weren't using Bash. You can change your default shell using the chsh command.



来源:https://stackoverflow.com/questions/10990314/bash-tree-direction-in-sub-shell-working-incorrectly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!