Here's the deal: I'm trying to write a
string into a file, however, the file is located on a remote server to which I'm connected to via SSH.
Basically, I'm SSHing into the remote server, and then running:
echo "some text" >> somefile.txt
That works great for single-line strings, but fails if the string has more than one line.
An alternative method for doing this would be to write the string to a local file, then upload the file to the server. But is that my only option?