[lug] redirecting stderr with 2>

Alan Robertson alanr at suse.com
Thu Jun 8 09:00:43 MDT 2000


Gary Hodges wrote:
> 
> I'm still fighting this signal 11 problem with my computer.  I think it's
> either RAM or the processor.  Anyway, I've written a script that compiles
> kernels over and over, with stderr being redirected to a file using 2>>
> .  The file gets warnings, but after 100 compiles there are no signal 11
> errors.  I don't think the signal 11 lines (when they happen) include the
> word "warning."  So the short question is, will 2>> capture things like
> "error" and "fatal?"  I hope it does, then I will have good confidence
> that the processor and one of my memory sticks are OK.

2> captures everything which was written to file descriptor 2.  This is
up to the particular program.  I have seen compilers that sent all
output to file descriptor 1, and some that send it all to file
descriptor 2.

If you want to capture everything, then do this:

	commandlinestuff >>save.output 2>&1

This will capture both outputs to the same file.

	-- Alan Robertson
	   alanr at suse.com




More information about the LUG mailing list