2015-05-20 73 views
3

什么是鱼等效< < Bash中,如什么是鱼等效<< EOF Bash中

$ nc localhost 8888 << EOF 
> foo 
> EOF 

鱼,它崩溃

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

https://github.com/fish-shell/fish-shell/issues/540 –

回答

3

,是不是在执行鱼。你可以阅读关于Bash/Fish语法交叉HERE

1

多亏了伊坦提供的链接,我发现这样的特征是没有实现,并提供最接近的是

> echo "\ 
    foo 
    " | nc localhost 8888