我熟悉这种语法:
cmd1 << EOF | cmd2 text EOF
但刚刚发现bash允许我写:
cmd1 << EOF | text EOF cmd2
(heredoc用作cmd1的输入,cmd1的输出用于cmd2).这似乎是一个非常奇怪的语法.它是便携式的吗?
bash shell pipe heredoc sh
bash ×1
heredoc ×1
pipe ×1
sh ×1
shell ×1