I did a lot of search on this forum on spiting file; found a lot, but my requirement is a bit different, please guide.
Master file:
x:start:5
line1:23
line2:12
2:90
x:end:5
x:start:2
45:56
22:90
x:end:2
x:start:3
line1:23
line2:12
x:end:3
x:start:2
line5:23
line8:12
2:90
x:end:2
x:start:5
someline
x:end:5
I want to split the above file with 2 instances in one file, so that
file1:
x:start:5
line1:23
line2:12
2:90
x:end:5
x:start:2
45:56
22:90
x:end:2
file2:
x:start:3
line1:23
line2:12
x:end:3
x:start:2
line5:23
line8:12
2:90
x:end:2
file3:
x:start:5
someline
x:end:5