5
1
I'm trying to write a shell script over ssh via a bash prompt. The shell, however, insists on interpreting any variable I want to write instead of writing it directly to file. For example, cat <<EOF >checkup.sh\n'$command'EOF is simply written as '' to file. How do I get $command written instead? I've tried every practical method of escaping I can think of.
If it changes anything, I'm doing it over PHP using phpseclib.
I actually needed the INVERSE of this (had a script with "EOF", needed to handle variables) and this pointed me at it.
Thanks! – Samurai Ken – 2012-12-04T07:06:23.783