There may be a question out there for this somewhere. But I wasn't able to find it easily.
Basically I want to write a bash script on a new box. A script that I've previously used.
Example:
#!/bin/bash -ex
hi='hello world!'
echo $hi
I've always used (for multiline output)
cat > script.sh <<EOF
#!/bin/bash -ex
hi='hello world!'
echo $hi
EOF
But as you may have noticed this has issues with $hi, and other symbols. Is there a good way to do this? Tips Tricks?
bash --version
. – muru Dec 23 '15 at 19:57