[ -r file ] && echo 'readable'
Category: Bash Scripting
[ -r file ] && echo 'readable'
Short-circuit AND: run second command only if first succeeds
Short-circuit AND: run the second command only if the first succeeds (exits with 0). Like 'if A then do B'.