【问题标题】:What is Fish equivalent for <<EOF in Bash在 Bash 中 <<EOF 的 Fish 等价物是什么
【发布时间】:2015-05-20 18:08:20
【问题描述】:

Bash 中

$ nc localhost 8888 << EOF
> foo
> EOF

在 Fish 中,它崩溃了

> nc localhost 8888 << EOF
fish: Expected redirection specification, got token of type 'Redirect input to file'
nc localhost 8888 << EOF
               ^

【问题讨论】:

标签: bash shell fish


【解决方案1】:

感谢 Etan 提供的链接,我发现没有实现这样的功能,最接近的是

> echo "\
  foo
  " | nc localhost 8888

【讨论】:

    【解决方案2】:

    这在 Fish 中没有实现。您可以阅读有关 Bash/Fish 语法交叉的信息HERE

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-26
      • 2021-06-19
      • 2011-01-25
      • 2014-05-08
      • 2012-06-16
      • 2014-06-12
      • 1970-01-01
      相关资源
      最近更新 更多