in reply to Long download progress report
Something like this (totally untested) code might work for you assuming that the progress reporting on teh remote computer is output to either stdout or stderr:
use threads; my $fh; my $pid; async { $pid = open $fh, "scp dvader@empire.gov:file1.txt dvader@deathstar.com:somedir +2>&1 |" or die $!; }->detach; while( <$fh> ) { print; } close $fh; kill 'quit', $pid;
This runs the command asynchronously through a forking open, redirects all the output to a pipe and then displays the output on the screen.
Note: I've never used scp, so the syntax and indeed the whole idea is just speculation.
|
|---|