Revision 11852
Added by Aaron Marcuse-Kubitza about 11 years ago
lib/sh/util.sh | ||
---|---|---|
687 | 687 |
stderr2stdout() # usage: stderr2stdout cmd... # unlike `2>&1`, logs stderr |
688 | 688 |
{ echo_func; "$@" 2> >(echo_run tee /dev/fd/"$log_fd"); } |
689 | 689 |
|
690 |
stdout_contains() # usage: stderr2stdout cmd|stdout_contains echo_run grep ... |
|
691 |
{ echo_func; pipe_delay; pipe_delay; "$@"|echo_stdout >/dev/null; } |
|
692 |
|
|
690 | 693 |
# convention: use fd 40/41/42 for command-specific alternate stdin/stdout/stderr |
691 | 694 |
# mnemonic: 4 looks like A for Alternate |
692 | 695 |
# 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 stdout_contains()