Project

General

Profile

« Previous | Next » 

Revision 12192

lib/sh/util.sh: added ignore_err_msg()

View differences:

trunk/lib/sh/util.sh
707 707
	stderr2stdout "$@"|stdout_contains echo_run grep -E "$pattern"
708 708
}
709 709

  
710
function ignore_err_msg() # usage: pattern=... ignore_err_msg cmd...
711
{
712
	echo_func; kw_params pattern; : "${pattern?}"
713
	stderr_matches try "$@" || rethrow # try: suppress error exit status
714
}
715
alias ignore_err_msg='"ignore_err_msg" ' # last space alias-expands next word
716

  
710 717
# convention: use fd 40/41/42 for command-specific alternate stdin/stdout/stderr
711 718
# mnemonic: 4 looks like A for Alternate
712 719
# do NOT use 1x, which are used by eval (which is used by set_fds())

Also available in: Unified diff