hi all
I have a file like ;
O00000098acompany20020820170501.txt
B2002082001349027000000983512002082000000000000
D013409190009825351 000000000024029340000028000364 654+65464 546 45465 0028000364 5454545 142 422 5454663 41534354 24123 32 4212521568002149701X145 0000000
D0046002280034486-1 000000000004561420500028000545 31435 412413 23154 0028000545 54543 221215 54153 54564564 45645 5454 4)
O00001697bcompany00120020820172501.txt
B2002082001349142000016973542002082000000000000
D013409190009825351 000000000024029340000028000364 65456465 123 46545 0028000364 45446654 545 351 945513 3212313 35413 32 4212521568002149702 0000000
D0046002280034486-1 000000000004561420500028000545 42133 541654 654564 0028000545 54126 534163
And i need a script to cut some lines to make diferent files.When script finds a line start with "O00000098acompany20020820170501.txt" script will create another file with name of this line and will have lines until the another line which starts "O00001697bcompany00120020820172501.txt" .It will continue to create file until end of the file.First two charecters of the file name will be same in the file(O0).
Thanks for any help.
I have a file like ;
O00000098acompany20020820170501.txt
B2002082001349027000000983512002082000000000000
D013409190009825351 000000000024029340000028000364 654+65464 546 45465 0028000364 5454545 142 422 5454663 41534354 24123 32 4212521568002149701X145 0000000
D0046002280034486-1 000000000004561420500028000545 31435 412413 23154 0028000545 54543 221215 54153 54564564 45645 5454 4)
O00001697bcompany00120020820172501.txt
B2002082001349142000016973542002082000000000000
D013409190009825351 000000000024029340000028000364 65456465 123 46545 0028000364 45446654 545 351 945513 3212313 35413 32 4212521568002149702 0000000
D0046002280034486-1 000000000004561420500028000545 42133 541654 654564 0028000545 54126 534163
And i need a script to cut some lines to make diferent files.When script finds a line start with "O00000098acompany20020820170501.txt" script will create another file with name of this line and will have lines until the another line which starts "O00001697bcompany00120020820172501.txt" .It will continue to create file until end of the file.First two charecters of the file name will be same in the file(O0).
Thanks for any help.