if [ $hash = "------" -o $hash = "0" ]
The logical OR in bash is -o, whereas the logical AND is -a. Also do not confuse arithmetic operators with string operators: EQUAL will be = for string comparison, it will be -eq for integer comparison. See section 7.3
of the Advanced Bash Scripting Guide for details.