On Thu, 2009-12-10 at 22:20 -0500, Chet Ramey wrote: > > Nothing good.
Pity. > The next version of bash will allow you specify an arbitrary > file descriptor where the xtrace output will be written. Cool. I wonder how long it will take the distros to pick that up though. Sure, I could build my own packages, but the distro/arch matrix here makes that somewhat prohibitive. I suppose by that same token trying to play with FDs so that: foo() { echo "this is a message the user should see on stdout" echo "this is the function return value" } bar=$(foo) echo "bar==$bar" Yields: $ foo.sh 2>/dev/null this is a message the user should see on stdout bar==this is the function return value Is equally difficult? Or can I more easily play with FD duplication and redirection to achieve that, even if it means adding a ">&word" at the end of things I want on the real stdout? b.
signature.asc
Description: This is a digitally signed message part