Bash if statement with multiple conditions throws an error

I’m trying to write a script that will check two error flags, and in case one flag (or both) are changed it’ll echo– error happened. My script: my_error_flag=0 my_error_flag_o=0 do something….. if [[ “$my_error_flag”==”1” || “$my_error_flag_o”==”2” ] || [ “$my_error_flag”=”1” && “$my_error_flag_o”=”2” ]]; then echo “$my_error_flag” else echo “no flag” fi Basically, it should be, … Read more