tee and some commands

Todd A. Jacobs codegnome.consulting+ubuntu at gmail.com
Tue Mar 22 13:01:12 UTC 2011


On Tue, Mar 22, 2011 at 3:51 AM, Oliver Marshall
<Oliver.Marshall at g2support.com> wrote:
> Is there a way I can work around that or is it a limitation in the ncftpput
> command do you think?

The tee command creates its copies from standard input, but you may be
seeing standard error from the previous commands in the pipeline. A
common fix with tools like tee is just to ensure that both standard
output and standard error from your command both go to the same file
descriptor. Hence:

    foo 2>&1 | tee /tmp/bar

will pipe all output through tee, not just standard output. Give it a
try and see if that helps.




More information about the ubuntu-users mailing list