shell operator EOF shell 操作符 << <<<

总结:

这些被叫做shell操作符 shell operator

主要分为 control operators和redirection operators

 <<: 这个被称作here document, 通常用来 打印多行string

command会接收任何东西直到它找到下一个WORD(标记),Text是输入给command的内容

通常WORD一般用EOF,还可以是其他你喜欢的字母string, 如果WORD被引号了,里面的内容不会有变量展开,如果没有被引号,那么变量会被展开

如果你想把command << WORD ... WORD 的结果继续向后导入,你必须把pipe放在<< WORD的同一行,你不能放在 第二个WORD或者别的行上

<<<被称为 here string,类似于here documents,但被放在single line上使用,这个只存在于Unix port or rc(它起源的地方),zsh 一些ksh yash和bash上

无论什么东西给WORD都会被展开,并且值会传给command,这个一般用将变量传给一个command

原文:

https://unix.stackexchange.com/questions/159513/what-are-the-shells-control-and-redirection-operators

原文地址:https://www.cnblogs.com/eret9616/p/14630435.html