fixed bash conditional regex error