mouss wrote:
check_parameter() { postconf $1 2>&1 | grep -vq "unknown parameter" return $? }or check_parameter() { postconf $1 2>/dev/null | grep -q = return $? }
Then, you need an exit-code wrapper for "grep" too, it seems :)
check_result() {
RESULT=$( grep "${1}" "${2}" 2>/dev/null )
[ "${RESULT}" = "" ] && return 1
return 0
}
So, why not directly?
Would be neat, great for functionality and just one line more of code ....
