[mythtv-users] Redirecting output (was Re: OT: Mount problems)
JMailingListNoDigest at gmail.com
Sun Nov 30 15:12:35 UTC 2008
Robin Hill wrote:
> On Sun Nov 30, 2008 at 02:36:14AM -0500, MailingListJ wrote:
>> Michael T. Dean wrote:
>>> command > /path/to/file 2>&1
>> whats the 2>&1 do?
> A standard application has access to two separate output streams (both
> of which will print to screen by default):
> 1: STDOUT (standard output) - used for reporting results
> 2: STDERR (standard error) - used for reporting errors
> When you run "command > file" it just redirects the first (STDOUT)
> output stream. In most cases that's what you want, as that contains the
> main output of the program, without any extra debug messages, etc.
> However, in some cases you do want the error messages as well, so the
> 2>&1 tells it to redirect the second output stream (STDERR) to the first
> (STDOUT). This means all the output will go to the same place - in this
> case, the file.
Yes thank you!! I feel kind of dumb now I should have realized that....
More information about the mythtv-users