[wplug] Need help capturing console text

Bruce Adams bruce.adams at acm.org
Tue Mar 30 05:32:43 EDT 2010


My example was wrong (my explanation was OK). The target of the stdout 
redirect (">") needs to be specified before attempting to redirect 
stderr ("2>...").

et.x86 > ~/tce.log 2>&1

- Bruce

P.S. Too early in the morning to think straight. Remind me to never 
reply to a mailing list without trying what I suggest.

On 03/30/2010 05:24 AM, Bruce Adams wrote:
>
> Rob -
>
> 2>&1 means send stderr output to the current stdout file handle. The 
> trouble is, you have not yet changed the stdout file handle, so stderr 
> is still going to the console. Put the initial, stdout, redirect 
> first; like this:
>
> et.x86 > 2>&1 ~/tce.log
>
> - Bruce
>
>> On Mar 30, 2010 2:47 AM, "Robert E. Coutch" 
>> <robert.coutch at verizon.net <mailto:robert.coutch at verizon.net>> wrote:
>>
>> Hi,
>>
>> I have a program that while it runs is constantly dumping information 
>> to the
>> console.
>> I am running this in KDE's console (KDE 4.3.5).
>> I want to capture this data so I did the following:
>>
>> et.x86 2>&1> ~/.tce.log
>>
>> et.x86 is the executable.
>> The file .tce.log is created in my home directory.
>> The file contains no data even though the console is filled with text 
>> from the
>> program.
>>
>> Am I missing something?
>> Is there a way to grab text directly from the console window (from a bash
>> script)?
>>
>>
>> Thanks for any help on this,
>>
>> Rob
>> _______________________________________________
>> wplug mailing list
>> wplug at wplug.org <mailto:wplug at wplug.org>
>> http://www.wplug.org/mailman/listinfo/wplug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wplug.org/pipermail/wplug/attachments/20100330/f8c30635/attachment.html 


More information about the wplug mailing list