I have file file1.txt /file2.txt When I run the awk command with boundary search between "Type header call_header " and "END" it print the lines below END also . Example :-
File1.txt
Type header call_header
abc , def , ghi ,
jkl ,mno
END
Define call_header
type as call_header
Fil2.txt
Type head call_header
data1, data2, voice ,
mms , mms2
END
Define call_header
type as call_header
I have tried:
awk '/^Type (header|head) call_header$/,/^END?$/' {print} file1.txt
However, it is printing other lines also .
Need Below data only :
Type header call_header
abc , def , ghi ,
jkl ,mno
END