Remove dependency on awk; Do not check for [, as it is a shell builtin and guaranteed to be there on Posix compliant shells