【问题标题】:How do I execute curl stdout with interactive prompt?如何使用交互式提示执行 curl stdout?
【发布时间】:2019-01-10 13:03:51
【问题描述】:

我有一个shell脚本setup.sh,写的有点像这样。

#!/bin/sh

bash <(curl -fsSL https://raw.githubusercontent.com/liuchengxu/space-vim/master/install.sh)

我已经将模式设置为可执行。但是当我在终端中执行./setup.sh 来执行这个脚本时,我得到了错误提示。

line 3: syntax error near unexpected token `('
我的脚本有什么问题?

我正在使用 iTerm 和 zsh。

谢谢!

【问题讨论】:

  • 您正在通过#!/bin/sh 运行您的命令 - 这不是bash/bin/sh 不理解 &lt;( 进程替换。
  • @Corion 谢谢!将其更改为#!/bin/bash 解决了它。大声笑

标签: shell sh iterm2


【解决方案1】:

感谢@Corion,我不应该将 #!/bin/sh&lt;( 一起使用,将其更改为 #!/bin/bash 为我工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-14
    • 1970-01-01
    • 2021-08-14
    • 2020-05-14
    • 1970-01-01
    • 1970-01-01
    • 2017-10-09
    • 2020-10-14
    相关资源
    最近更新 更多