I want to ask what EOF!! is in the bash script. I did find EOF with google, but google will ignore the "!!" automatically, so I cannot find EOF!!. I know the end of the file token, but I don't exactly know what it means with the "!!" in the script. Is this a mark to force something to do something like in vim's wq! ? Plus, why and when should we use EOF!! instead of EOF?
EoF - "stop reading immediately after the word EoF is found in the multi-line input" As other answers have explained, the multi-line input is called a Here Document (i.e. it's a document that's being provided 'inline' or 'on the spot'). A Here Document is often used to generate output to be passed to a subsequent process.
linux - How does "cat << EOF" work in bash? - Stack Overflow
50 I am a newbie in Linux admin and while I'm learning GDB to debug my code, I need to create an input.txt file for my program to read. I know redirection symbols such as >, >>, and <, but couldn't find info about << via Google since it ignores it. What does the <<EOF do below?
If you use <<-EOF, I recommend the man page of the Bourne Shell: If, however, the hyphen (-) is appended to <<: leading tabs are stripped from word before the shell input is read (but after parameter and command substitution is done on word); leading tabs are stripped from the shell input as it is read and before each line is compared with word; and shell input is read up to the first line ...