You can use either of these:
sed '/^Keyword:$/d' file
sed
looks for lines being exactly Keyword:
and d
eletes them.
awk '$0 == "Keyword:" {next} 1' file
It checks lines that are exactly Keyword:
and skips them with next
. Then 1
is True, so it performs the default awk action: {print $0}
.
Or better and shorter (thanks Jaypal!):
awk '$0 != "Keyword:"' file
Output:
$ awk '$0 == "Keyword:" {next} 1' file
First line
line1
Line2
abc
def
jkl
123456
opertxt
$ sed '/^Keyword:$/d' file
First line
line1
Line2
abc
def
jkl
123456
opertxt