simple example inputfile
If I want to print the next line after the regex2.
In my inptut file
How can I print only the field under specified regex.
I'm trying to accomplish this by loop over NF and calling the match() function.
Any suggestions.
Thanks
Code:
regex1 regex2 regex3
1 2 3
4 5 6
regex1 regex3 regex2
aa bb cc
7 8 9
If I want to print the next line after the regex2.
In my inptut file
Code:
awk '/regex1/{getline;print $0}' inputfile
How can I print only the field under specified regex.
I'm trying to accomplish this by loop over NF and calling the match() function.
Any suggestions.
Thanks