Fixed a bug in grep syntax

Had a bug from calling grep inside a test condition[]. turned it into
an && condition