in reply to Re^2: back tick to do ssh
in thread back tick to do ssh
Hi convenientstore,
Enclose the command you want to be executed on the remote host in quotes, like this:
my $result = `ssh host1 'echo something | /bin/others'`;
This way echo something | /bin/others will be run on host1 and the result will end up in $result.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: back tick to do ssh
by graff (Chancellor) on Dec 31, 2007 at 01:02 UTC | |
by kirillm (Friar) on Dec 31, 2007 at 01:07 UTC |