am new to this site. i have a requirement similar to this but i need to be done that sort based on count.
input file:
123456789BKVOLxxxx
1212312487289yyyyyy
jfasjkjkshk;sadfjjjsff
99999999sWOOTHshg
123456789BKVOLxxxx
1212312487289yyyyyy
13wrgbfghg;sadfjjjsff
99999999sWOOTHshg123456789BKVOLxxxx
1212312487289yyyyyy
jfasjkjkshk;sadfjjjsff
99999999sWOOTHshg
.
.
.
1212312487289yyyyyy
jfasjkjkshk;sadfjjjsff
99999999sWOOTHshg
123456789BKVOLxxxx
1212312487289yyyyyy
13wrgbfghg;sadfjjjsff
99999999sWOOTHshg123456789BKVOLxxxx
1212312487289yyyyyy
jfasjkjkshk;sadfjjjsff
99999999sWOOTHshg
.
.
.
now output should be : If BKVOL is found more than 24 times we need to del records as below
The way to check is to do a find on ‘bkvol’, it should occur 24 times. If it is more than 24, then you will have to copy the files and delete everything after the 24th occurrence of ‘wooth’.
please help me i saves me a lot of time.
Thanks in Advance