&是什么QUOT;<<<"意味着bash命令行上?而它在哪儿记录? [英] What does "<<<" mean on a bash command line? And where is it documented?

查看:109
本文介绍了&是什么QUOT;<<<"意味着bash命令行上?而它在哪儿记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是什么<<< 在此命令行的意思

What does <<< mean in this command line?

bc <<< "1 + 1"

这似乎并不组合&LT; &LT;&LT; ,我可以'找不到它的文档。这似乎表现就像

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

另外在 KSH 的作品,但不是在 SH

推荐答案

它引入了一个字符串,在这里,在附近的输入和输出重定向的部分的结尾记录。一个here字符串就是一个字在这里的文件:

It introduces a here string, documented near the end of the section on input and output redirections. A here string is just a one-word here document:

bc <<< "1 + 1"

等同于

bc <<EOF
1 + 1
EOF

这篇关于&是什么QUOT;&LT;&LT;&LT;&QUOT;意味着bash命令行上?而它在哪儿记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆