击:不正确的工作树方向子shell [英] Bash: tree direction in sub-shell working incorrectly

查看:128
本文介绍了击:不正确的工作树方向子shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我测试了这一个CentOS机器上了一段时间回来,它很好的工作。现在,另一台机器上,我尝试这样做,它无法工作。什么是不正确的?

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 `>'

有什么建议?

推荐答案

答案是错误消息。传统的Bourne shell( SH )不支持进程替换(例如>(命令))。你没有使用bash。您可以使用 CHSH 命令来改变默认的shell。

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.

这篇关于击:不正确的工作树方向子shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆