Revision 11851
Added by Aaron Marcuse-Kubitza about 11 years ago
lib/sh/util.sh | ||
---|---|---|
684 | 684 |
} |
685 | 685 |
alias filter_fd='"filter_fd" ' # last space alias-expands next word |
686 | 686 |
|
687 |
stderr2stdout() # usage: stderr2stdout cmd... # unlike `2>&1`, logs stderr |
|
688 |
{ echo_func; "$@" 2> >(echo_run tee /dev/fd/"$log_fd"); } |
|
689 |
|
|
687 | 690 |
# convention: use fd 40/41/42 for command-specific alternate stdin/stdout/stderr |
688 | 691 |
# mnemonic: 4 looks like A for Alternate |
689 | 692 |
# do NOT use 1x, which are used by eval (which is used by set_fds()) |
Also available in: Unified diff
lib/sh/util.sh: added stderr2stdout()