I'm trying to have a script exit with an error in the event it can't reach an X server:
xset -q &> /dev/null || { echo "The Display Server is BROKEN. Aborting."; exit 1; }
However, I'm getting the output of xset -q
spat out to the console. I'm not quite sure why. My understanding of &>
was that it redirected all output.