in reply to Re^2: scp output without having to use "Net::SCP" in Perl
in thread scp output without having to use "Net::SCP" in Perl
You're trying to scp a command, and the output, to another host? Try breaking that up into separate tasks -- this is what /tmp is for. Connect via ssh to the host and run your command, redirecting the output to /tmp/someuniquefile, then scp the file to whatever location you want. When you start introducing commands with pipes and such in variables for remote execution, the complexity increases. Do one task at a time, and you can manually verify that they work separately.
Edit: I misread a piece -- you don't scp data, you scp a file. Save the output to /tmp/something, and scp that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: scp output without having to use "Net::SCP" in Perl
by pjzero@90 (Novice) on Jun 03, 2015 at 23:10 UTC | |
by GotToBTru (Prior) on Jun 04, 2015 at 14:59 UTC |