in reply to capture scp output
I believe that scp does an isatty() on it's output and doesn't write the statistics unless it's being run from a terminal, and casual poking seems to confirm that's the case. You could use Expect or IPC::Run to run it with a pty and that should fool it into producing the statistitcs.
Of course it might be simpler to just save time before you start and again after the system( scp => ... ) returns, subtract and divide that into the file size (obtained with -s or stat.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: capture scp output
by tomfoolry (Initiate) on Apr 20, 2005 at 17:51 UTC |