in reply to Odd perl/ssh interaction
Also, rather than storing the output of the ssh command into a file, it might be simpler to issue the command with backticks and store the result into a variable. Something like this (untested):
(I don't know whether you need redirection in the ssh command. I would assume the output should come on STDOUT.)my $uptime_output = `ssh $_ 'uptime'`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Odd perl/ssh interaction
by afoken (Chancellor) on Jul 08, 2017 at 15:19 UTC | |
|
Re^2: Odd perl/ssh interaction
by mlf (Initiate) on Jul 08, 2017 at 13:29 UTC |