GEN: replace some grep with awk