Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Redirect a specific file descriptor to a pipe?



On Mar 10,  5:22pm, Stephane Chazelas wrote:
}
} > strace -o /dev/fd/3 ./a.out > out.log 2> err.log 3>&1 | less
} [...]

Indeed, I've got the 3>&1 in the wrong place.  Sorry about that.

} In zsh, to avoid the multios effect, you can do:
} 
} {strace -o /dev/fd/3 ./a.out 3>&1 > out.log 2> err.log} | less
} 
} or disable multios (set +o multios).

With multios and without the braces, out.log gets the a.out output
and less gets both the strace output and the a.out output, which is
actually what I meant to do (but might not be exactly what Nathan
wanted, in retrospect).  Thanks for the correction.



Messages sorted by: Reverse Date, Date, Thread, Author