* contrib/compare_tests: Eliminate Shellcheck warnings.
* contrib/mysql/sum2xml.sh: Likewise.
Warnings fixed:
Use single quotes, otherwise this expands now rather than when signalled. [SC2064]
Trapping signals by number is not well defined. Prefer signal names. [SC2172]
SIGKILL/SIGSTOP can not be trapped. [SC2173]
Trapping signals by number is not well defined. Prefer signal names. [SC2172]
Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. [SC2181]
read without -r will mangle backslashes. [SC2162]
egrep is non-standard and deprecated. Use grep -E instead. [SC2196]