remove unneeded grep after awk by improving awk command