What is EOF!! in the bash script?

后端 未结 5 1648
萌比男神i
萌比男神i 2021-02-13 12:08

There is a command I don\'t understand:

custom_command << EOF!!

I want to ask what EOF!! is in the bash script. I did find EOF with googl

5条回答
  •  走了就别回头了
    2021-02-13 13:02

    As others already wrote, this is a here-document.

    The token used for that should be chosen carefully; as the probability that the here-document contains EOF!! is lower than for EOF itself, they chose that.

    I suppose they checked it does not harm before using it; !! in a script does NOT refer to the history, but it stays as it is.

提交回复
热议问题