bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xtrace output on new file descriptor


From: Chet Ramey
Subject: Re: xtrace output on new file descriptor
Date: Thu, 10 Dec 2009 22:20:02 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 12/10/09 10:12 PM, Brian J. Murrell wrote:
> I'm wondering if anyone has any tricks to preserve stderr on
> filedescriptor 2 and get xtrace output on a different file descriptor.
> 
> I've pulled hair trying to get the redirection right for this but just
> come up with the right combination.  I'd imagine it involves stashing
> away fd 2, duplicating fd 2 to a new fd and then restoring fd back from
> where it was stashed, or somesuch.
> 
> So to be clear, I want stdout on fd 1, stderr on fd 2 (as they are
> normally) and then the xtrace output on some other fd, presumably 3.
> 
> Ideas?

Nothing good.  The next version of bash will allow you specify an arbitrary
file descriptor where the xtrace output will be written.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]