[英]What does “<<<” mean on a bash command line? And where is it documented?
What does <<<
mean in this command line? <<<
在此命令行中是什么意思?
bc <<< "1 + 1"
It doesn't seem to a combination of <
and <<
, and I can't find documentation for it. 它似乎不是
<
和<<
的组合,而且我找不到它的文档。 It seems to behave just like 看起来就像
echo "1 + 1" | bc
Also works in ksh
, but not in sh
. 也可以在
ksh
,但不能在sh
。
It introduces a here string, documented near the end of the section on input and output redirections. 它引入了一个here字符串,记录在有关输入和输出重定向的部分结尾处。 A here string is just a one-word here document:
一个here字符串只是一个单词here文档:
bc <<< "1 + 1"
is equivalent to 相当于
bc <<EOF
1 + 1
EOF
That is the here string operator. 那是这里的字符串运算符。 See here string operator document.
请参阅此处的字符串运算符文档。
man ksh
您可以通过键入/(斜杠)后跟要搜索的内容(例如使用更少的程序)来在手册中执行搜索。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.