If I run
export COMMAND=nonexistentcommand && which $COMMAND >/dev/null || \
(echo "download filewithcommand.sh" && export COMMAND=./filewithcommand.sh)
echo "command: $COMMAND"
I get
download filewithcommand.sh
command: nonexistentcommand
But I think it should be
download filewithcommand.sh
command: ./filewithcommand.
What's wrong with this sentence?