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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/