Ho capito l'erroraccio.. La sintassi giusta credo sia questa:

if grep -q "stringa" file.txt
then .. ..


TGW