fixed cg (when grep matches multiple entries