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.
In reply to Re^3: back tick to do ssh
by kirillm
in thread back tick to do ssh
by convenientstore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |