bash if with or and negation

Viewed 48432

why does:

#!/bin/bash
wtf=false
if [ $wtf ] || [ ! -f filethatexists.whatever ]
then
 echo "WTF1"
fi
if [ ! -f filethatexists.whatever ]
then
 echo "WTF2"
fi

print:

WTF1

instead of nothing? It is especially perplexing that the second form works as expected and the first not.

3 Answers
Related