greycat 1317754790 learn "unary operator expected" typically means you forgot to quote something. [ $foo = bar ] is wrong. [ "$foo" = bar ] is OK.