getting a "[ missing ]" error. Trying bash cond statement instead of sh