This question already has an answer here:
This command doesn't seem to work in my script, how can I decide in which file I want this text, if I just create a file with the following command
I want the text to be in the file
$name that I just made in my script.
cat <<'EOF' Data... EOF