check.sh: reduced subshells