please tell me how to split the file into smaller pieces and file name should be {TAG}. All the contents should be in a file until it finds another {IT} tag. .
Right now the script works only if {TAG} is at the firstline as the start of each file. If replace <IT> instead of <TAG>(.*), if the value is same file will be overwritten. .
Please tell me how can I split the large file into smaller bits.