in reply to send STDOUT STDERR to function

G'day tsvi.tenebaum,

I think you'll find most of what you need in the open documentation. In particular, look for:

"Here is a script that saves, redirects, and restores STDOUT and STDERR using various methods: ..."

-- Ken