the validate rules on HP-UX complained on the [[ == ]] syntax so replaced it by [ = ]