I'm scp'ing several large files to a few servers in succession. I'd like to see the progress (so I don't want to use
scp --quiet), but I don't need to see the stats when the copy is complete.
Is there a tool that can receive input on stdin, echo it to stdout, and then remove it when the input stream closes? This reminds me of stuff ncurses can do, but I can't seem to find anything online that does this.
For instance, if such a utility were called
echo-then-discard, I could call it as:
scp lots-*-of-files "$server:$dest" | echo-then-discard
It's possible such a tool, even if it existed, might not work with the kind of updating
scp does -- since piping
scp output seems to just discard the progress (likely because ncurses needs direct access to the terminal to do the fancy updating).