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

前端 未结 3 1633
执念已碎
执念已碎 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: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 <

提交回复
热议问题