Is it possible to create a heredoc that does not undergo variable expansion?
eg.
cat <<-EOF > somefile.sh
Do not print current value of $1 instead evaluate it later.
EOF
Update . I know about shielding \. My actual heredoc has many variables in it - and it is a mistake, prone and tedious, to avoid all of them.
source
share