given an existing shell function (which i'm not free to rewrite) which has important side effects (sets variables, etc.) in the shell and which also prints on stdout and/or stderr, how can i either capture the output(s) of the function or pass them to another program for further processing, while still preserving any side effects? the obvious (command substitution, pipes) seems to run in subshells, which means the side effects disappear.
(as a motivating example, imagine a particularly noisy function that, on success, always prints a long message to stderr, and on failures, prints error messages to stderr. i would like to filter out the known success message, which can be matched with a regex, but continue to output anything else. (including stdout, if any.)) -- Aaron Davies [email protected] _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
