`||` is the OR operator. It executes the command on the right only if the command on the left returned an error. See https://unix.stackexchange.com/a/24685/23305. I think your example isn't correct bash though. The part to the right of `||` is missing the `echo` command: > true && echo "worked" || echo "didn't work" worked > false && echo "worked" || echo "didn't work" didn't work > false && echo "worked" || "didn't work" bash: didn't work: command not found