This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sending data to a script over SSH


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]