@reptar If you like bash things... you need to take some time with AWK that things is good...
Simple example:
Lot of people use bash to extract something, then filter with AWK then || to GREP or EGREP to filter more... AWK can do all that and you save the extra || to EGREP...