Hi all ,
I have a awk like this ,
awk '/Column_name/,/^ *$/ { print $0 }' tab.txt
Simply, select all lines between ( including ) the line containing the word 'Column_name' and subsequent blank line.
What I want if lines between ( and including ) line containing 'Column_name' and "subsequent blank line OR a line containing word 'ENDOFMESSAGE' ", how to do that ?
Means output should start with a line containing word 'Column_name' and end with either a blank line or a line containing word 'ENDOFMESSAGE' .
Regards
I have a awk like this ,
awk '/Column_name/,/^ *$/ { print $0 }' tab.txt
Simply, select all lines between ( including ) the line containing the word 'Column_name' and subsequent blank line.
What I want if lines between ( and including ) line containing 'Column_name' and "subsequent blank line OR a line containing word 'ENDOFMESSAGE' ", how to do that ?
Means output should start with a line containing word 'Column_name' and end with either a blank line or a line containing word 'ENDOFMESSAGE' .
Regards