Hi,
I was trying to process a file with the help of awk. I want to first display all the rows that contains 01 and at the end of processing I have to print some portion of all the lines. like below.
Output expected:
Hi,
I was trying to process a file with the help of awk. I want to first display all the rows that contains 01 and at the end of processing I have to print some portion of all the lines. like below.
Output expected:
And what did you try so far?
awk 'NR==FNR&&/^01 / {print $2} NR>FNR {gsub(/^01 /,"\n");print}' infile infile