I am trying to create a loop that checks a string if it contains the characters "#" or " ". If it does contain this, it echos out 'yes', otherwise with echos 'no'.
#!/bin/bash
string="#### ## #  #### #"
for (( i=0; i<${#string}; i++ )); do
        str="${string:$i:1}"
        if ["$str"!="#"||"$str"!=" "];
                then
                        echo "No"
                        break
                else
                        continue
        fi
        echo "yes"
done
 
     
    