Re: Redirect to Screen & File

From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 05/12/05


Date: Wed, 11 May 2005 22:55:22 -0400

On Thu, 12 May 2005 at 02:40 GMT, Kenny McCormack wrote:
> In article <6fral2-odd.ln1@rogers.com>,
> Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
> ...
>>>>man tee
>>>
>>> Why do people always give this advice (the "tee" command) ?
>>
>> Because it answers the question correctly and appropriately.
>
> Wrong. Thank you for playing our game.
>
>>> Agreed that it is the most basic, and most Unix-primitive way of addressing
>>> this problem, but in the real world, it is almost certainly inappropriate.
>>>
>>> Surely, "man script" is a lot closer to the mark (although those who've
>>> read my responses to this all too FAQ know that even that isn't a very
>>> robust solution).
>>
>> Script is not an appropriate answer to the question.
>
> See above. You need to think beyond the stated text and try to see what
> the OP's real problem is.

   In some cases, you may be right, but in this instance, the OP very
   clearly stated that it was the output from a script (e.g., the
   output of echo commands) that he wanted both displayed and
   redirected to a file.

   If he had been vague, you might have had a point.

-- 
    Chris F.A. Johnson                     <http://cfaj.freeshell.org>
    ==================================================================
    Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
    <http://www.torfree.net/~chris/books/ssr.html>


Relevant Pages