[wplug] Need help capturing console text

Robert E. Coutch robert.coutch at verizon.net
Tue Mar 30 08:50:44 EDT 2010


Thanks!
That was it.

I should have known that but writing shell scripts after 1:00 am probably 
means I'm not at my best.


On Tuesday 30 March 2010 05:32:43 am Bruce Adams wrote:
> 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
> 


More information about the wplug mailing list