i have a file that contains random lines and key words END:
line 1
line 2
...
line 23
END
line 25
....
line 40
END
and i want to split it into multiple files based on the key word END and have it inside each file as: file 1
line 1
line 2
...
line 23
END
file 2
line 25
.....
line 40
END
I tried:
csplit -k file_name '/END/' '{*}' but i do not get the correct output.