Shell programming; avoid subshell