Redirecting progress bar output

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi there,

I've lots of transfers done using scp running in batch mode with
pub/priv keys authentication. As they are fully automated, I'm
redirecting output to logs. That works just fine, but I would
additionaly benefit from having progress bar output also in the logs.
However redirecting stdout and stderr doesn't seem to do the trick. Is
there a way this can be done?


Re: Redirecting progress bar output

Quoted text here. Click to load it

Go into the source tree, edit progressmeter.c, find the function
can_output().  Change it to:

    static int
      /* return (getpgrp() == tcgetpgrp(STDOUT_FILENO)); */
      return (1);

Rebuild from source, and run.

Alternatively, add code for a custom flag to force progress meters and
modify can_output to return 1 if that flag is set.
  _+_ From the catapult of |If anyone disagrees with any statement I make, I
_|70|___:)=}- J.D. Baldwin |am quite prepared not only to retract it, but also
\      /|to deny under oath that I ever made it. -T. Lehrer

Site Timeline