I am new to linux, shell scripting, and trying to learn the fundamentals. I am currently on redirection chapter, where here document is being explained. I could not really understand how below works in conjunction with cat command. If some one can please tell me ?
cat << EOF line1 line2 line3 EOF
I very well understand how << EOF works. Keyword denotes end of input. My question is; cat takes filename as input stream; so that it can print its content on output stream. How does above work internally ? We are not specifying filename anywhere. Does shell create internally some temp file and give it to cat ? I hope my question is clear.