I have a flat file1 in below format
Keyword:
First line
Keyword:
line1
Line2
Keyword:
abc
def
jkl
Keyword:
123456
opertxt
I am using the below awk command and getting the output in file2
awk 'BEGIN { RS = "Keyword:" } {$1=$1} 1' file1 > file2
file2 looks like this
First line
line1 Line2
abc def jkl
123456 opertxt
I do not want to output like this, instead I want the output like the below pattern, the line with the keyword to be removed
First line
line1
Line2
abc
def
jkl
123456
opertxt
can someone suggest a solution using awk or sed. Thanks