Match the string and copy records to another location
Hi,
I have particular set of files which have the below contents:
****** PBX TYPE:ID6 PBX-id: A11 rolled on 123456 368763 00 >>>>>>
A11,2008-07-01 21:31:00.000,42,42112, ,XXXXXXXX
A11,2008-07-01 21:40:00.000,6, , ,XXXXXXX
A12,2008-07-01 21:53:00.000,68, , ,XXXXXXXX
A13,2008-07-01 21:55:00.000,8,XXXX, ,XXXXX
A11,2008-07-01 21:55:00.000,26, , ,XXXXX
A11,2008-07-01 21:55:00.000,26,XXXXX
****** PBX TYPE:GG3 PBX-id: A44 rolled on 011409 163401 00 >>>>>>
0237953 1234567890 T000018
0237953 1234567899 T000011
0236545 1234567870 T000023
I would want to copy the records starting with header as ****** PBX TYPE:ID6 to another location.
like :
****** PBX TYPE:ID6 PBX-id: A11 rolled on 123456 368763 00 >>>>>>
A11,2008-07-01 21:31:00.000,42,42112, ,XXXXXXXX
A11,2008-07-01 21:40:00.000,6, , ,XXXXXXX
A12,2008-07-01 21:53:00.000,68, , ,XXXXXXXX
A13,2008-07-01 21:55:00.000,8,XXXX, ,XXXXX
A11,2008-07-01 21:55:00.000,26, , ,XXXXX
A11,2008-07-01 21:55:00.000,26,XXXXX
How can i do that.
Thanks,
Sandeep