To parse through the file and print output using awk or sed script

suppose if u have a file like that

Hen ABCCSGSGSGJJJJK 15
Cock ABCCSGGGSGIJJJL 15
* * * * * * : * * * . * * * :
Hen CFCDFCSDFCDERTF 30
Cock CHCDFCSDHCDEGFI 30
* . * * * * * * * : * * :* : : .
The output shud be
where there is : and .

It shud tell that S7G becoz : is at 7 number and count start from A .
smiliarly F17H becoz . is at 17 number

so output shud be like where there is : and .

S7G
F17H etc...
J11I

You should skip that leet-speak and try to use a plain and civilized English if you don't want to be ignored!

Regards

Without supposing, how does the exact file look ?

We have many posts where the posters talk about a particular format of the input and much later say that the format is actually different.

I suspect this is homework. If you have something, post it. We will guide you further.

Suppose u have a file

ELLPSYSTATL
ELLSUYSTLTL

      • : . * * * :* *
        HHULJKLOPOA
        HPULJKLPOOA
  • . * * * * * : : * *

so output shud be like where there is : and . and counting start from E and end upto A

P4S
S5U
A9L
H13P
O19P
P20O

Dear...

I can simplify that file

ABCDEFG
ABCEEFH

      • : * * * .
        so it have three rows . Those first two rows say
        A and A match then it will be * (asterisk) in the third row.
        and those D and E not match there will be colon (: ) or
        G and H not match .(fullstop) in the third row

Our question is
In third row where there is colon (: ) and .(fullstop)
tell the number and wht is that name at that number
therefore output will be
D4E because colon is at 4 number
G7H because fullstop is at 7 number

And it will be a long file where there is colon and full stop
just tell the number and name ...

One more question is
In some other files colon or fullstop may be at 4th row or 5th row
can u script this one also separately