In a monitoring script I wrote if [ $count > 10 ]; then. The branch runs every time, whatever the count, and afterwards there is an empty file named 10 in the directory. A second test, if [ $mode == "auto" ], stops with unary operator expected when mode has not been set.
What is wrong with these, and what are the differences between single brackets, double brackets and double parentheses?




