[PLUG] Correct use of 'tee'

Rich Shepard rshepard at appl-ecosys.com
Sun Jan 15 17:32:48 PST 2006

   The man page for 'tee' is so skinny, it's emaciated. I found it useless.

   I was trying to capture the errors in a 'make' to a file called
build_errors.log. When I tried 'make | tee build_errors.log' all I got was
the last line on the screen. The info command was no more forthcoming.

   Finally, I found a web page with a highly convoluted command line
(redirecting 3>&1, 1>&2, and so on) while piping various outputs through a
couple of different invocations of 'tee.' It worked, but I had four files;
two duplicates of what looked like the output of stdout and stderr.

   I guess that what I was getting was the output to stderr going to the file.
But, I even tried 'make 2>&1 | tee build_errors.log', but that didn't work
either. Should I be re-directing 1>&2 and sending that to the file with tee?

   *@$%!!)^ man page!


Richard B. Shepard, Ph.D.               |   Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM)   |  Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com>     Voice: 503-667-4517         Fax: 503-667-8863

More information about the PLUG mailing list