in reply to Grep n awk

Actaully lines are like

abcd dg 17786 sam mixed --

abcd -- 17889 ram -- --

dg 17786 dam mixed --