You've got two greps in a row here. ``$OUTFILE`` needs to be given to the first one.