How can I suppress parameter expansion in a here-doc in Bash?
You can disable parameter expansion in here documents by quoting the limit string:
cat >aBashScript.sh <<'EOL'
$name
EOL
You need to escape the dollar sign, simply prefix it with a backslash to escape it like so:
cat >aBashScript.sh <<EOL
\$name
EOL
Or disable quoting as @Michael suggested.