Replace some useless cat | grep with grep