Instead of writing out a large block for an if / elif such as…
if [[ $foo == $bar ]]; then echo "yes" else echo "no fi
a much shorter version can be used instead:
[[ $foo == $bar ]] && echo "yes" || echo "no"
[[ condition ]] && positive result || negative result