How to identify heredocs in shell scripts?

tr a-z A-Z << END_TEXT
one two three
four five six
END_TEXT

i dont want this to be executed when someone runs the script that this is in. but for some reason, it gets executed. anywhere i can wrap this up in something to make sure it never gets executed?

another example:

 cat << 'EOF'
 \$ Working dir "$PWD" `pwd`
 EOF

when i run the script this second example is in, it should output:

\$ Working dir "$PWD" `pwd`

OS: Linux
SHELL: sh/bash

Why are you using heredoc syntax if you do not wish to the shell to interpret the heredoc syntax? What am I missing? If you do not want the shell to interpret the output, redirect the output to a file.