Making command substitutions POSIX-compliant