This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Sending data to a script over SSH
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 01 Jul 2009 08:51:16 +0100
- Subject: Re: Sending data to a script over SSH
- References: <59BFA592-AAB6-4120-9339-C10F472CA385@pobox.com>
Chap Harrison wrote:
> I'm wondering how to send a script invocation followed by the clipboard
> data that the script will read and transform. I know how to use ssh to
> send a command to a remote system; I can do that from DOS. But is there
> any way to say "run this command and, by the way, the data it needs is
> right behind it"? Sort of like an input redirection with a HERE-doc, to
> put it very loosely?
SSh is a full bidirectional pipe, connected to the remote process. You can
use any kind of redirection you like
< ... commands ... > | ssh user@host <scriptname>
ssh <file user@host <scriptname>
getclip | ssh user@host <scriptname> | putclip
You might like to check the man page of those last two commands while you're
at it ;-)
*doubletake* Err, I mean, you might like to check the --help output from
them. Couldn't find any documentation anywhere.
cheers,
DaveK
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple