I have a file containing multiple lines starting with "1ECLI H--- 12.345 .....". I want to remove a space between I and H and add R/S/T upon iteration of the H pattern. for eg. H810 if repeated in consecutive three lines, it should get added with a letter R, S (second iteration), T (third iteration). so it would be H810R. Any help will be appreciated.
text looks like below
1ECLI H813 98 7.529 8.326 9.267
1ECLI H813 99 7.427 8.470 9.251
1ECLI C814 100 7.621 8.513 9.263
1ECLI H814 101 7.607 8.617 9.289
1ECLI H814 102 7.633 8.489 9.156
1ECLI H814 103 7.721 8.509 9.305
1ECLI C74 104 8.164 8.733 10.740
1ECLI H74R 105 8.247 8.690 10.799
upon chage
1ECLI H813R 98 7.529 8.326 9.267
1ECLI H813S 99 7.427 8.470 9.251
1ECLI C814 100 7.621 8.513 9.263
1ECLI H814R 101 7.607 8.617 9.289
1ECLI H814s 102 7.633 8.489 9.156
1ECLI H814T 103 7.721 8.509 9.305
1ECLI C74 104 8.164 8.733 10.740
1ECLI H74R 105 8.247 8.690 10.799
Thanks.