I haven't tested it, but I believe one of the two should work:
echo -e "1\n2\n3" | ssh [EMAIL PROTECTED] "cat >/tmpfile" (wouldn't work if
the PHP script wasn't on the machine locally, of course)
or
ssh [EMAIL PROTECTED] 'echo -e "1\n2\n3" > /tmp/file'
-Jeremiah
On Nov 6, 2007, at 3:00 PM, Wade Preston Shearer wrote:
I have a PHP script that I am running from the command line. I have
a string of text with new line characters in it that I am trying to
write out into a file on a remote server. Here is what I have so far:
ssh [EMAIL PROTECTED] echo -e "1\n2\n3" > /tmp/file
It is writing to /tmp/file locally though instead of on the remove
server.
Also, it is not respecting the new lines. The contents of the file
are "1n2n3".
What am I doing wrong?
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net