What does “<<<” mean on a bash command line? And where is it documented?

前端 未结 3 1634
执念已碎
执念已碎 2020-12-22 04:40

What does <<< mean in this command line?

bc <<< \"1 + 1\"

It doesn\'t seem to a combination of <

相关标签:
3条回答
  • 2020-12-22 05:01

    That is the here string operator. See here string operator document.

    0 讨论(0)
  • 2020-12-22 05:04

    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"
    

    is equivalent to

    bc <<EOF
    1 + 1
    EOF
    
    0 讨论(0)
  • 2020-12-22 05:22
    man ksh
    

    You can perform a search in a manual by typing / (slash) follow by what you search, like with less program.

    0 讨论(0)
提交回复
热议问题