Revision 11854
Added by Aaron Marcuse-Kubitza about 11 years ago
lib/sh/util.sh | ||
---|---|---|
690 | 690 |
stdout_contains() # usage: stderr2stdout cmd|stdout_contains echo_run grep ... |
691 | 691 |
{ echo_func; pipe_delay; pipe_delay; "$@"|echo_stdout >/dev/null; } |
692 | 692 |
|
693 |
stderr_matches() # usage: pattern=... stderr_matches cmd... |
|
694 |
{ |
|
695 |
echo_func; kw_params pattern; : "${pattern?}" |
|
696 |
stderr2stdout "$@"|stdout_contains echo_run grep -E "$pattern" |
|
697 |
} |
|
698 |
|
|
693 | 699 |
# convention: use fd 40/41/42 for command-specific alternate stdin/stdout/stderr |
694 | 700 |
# mnemonic: 4 looks like A for Alternate |
695 | 701 |
# 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 stderr_matches()