help in writing awk script, plz urgent
I have a file like this I have to
I have input file this , I want to give the out put in the below
input file
(NARAYANA 1 ENDING AT (100, 16383)
,NARAYANA 2 ENDING AT (100, 32766)
,NARAYANA 3 ENDING AT (100, 49149)
,NARAYANA 4 ENDING AT (100, 65535)
,NARAYANA 5 ENDING AT (200, 16383)
,NARAYANA 6 ENDING AT (200, 32766)
,NARAYANA 7 ENDING AT (200, 49149)
,NARAYANA 8 ENDING AT (200, 65535))
----------------------------------------------------
output file:
(NARAYANA 1 ENDING AT(100, 8191)
,NARAYANA 1 ENDING AT(100, 16383)
,NARAYANA 2 ENDING AT(100, 24574)
,NARAYANA 2 ENDING AT(100, 32766)
,NARAYANA 3 ENDING AT(100, 40957)
,NARAYANA 3 ENDING AT(100, 49149)
,NARAYANA 4 ENDING AT(100, 57342)
,NARAYANA 4 ENDING AT(100, 65535)
,NARAYANA 5 ENDING AT(200, 8191)
,NARAYANA 5 ENDING AT(200, 16383)
,NARAYANA 6 ENDING AT(200, 24574)
,NARAYANA 6 ENDING AT(200, 32766)
,NARAYANA 7 ENDING AT(200, 40957)
,NARAYANA 7 ENDING AT(200, 49149)
,NARAYANA 8 ENDING AT(200, 57342)
,NARAYANA 8 ENDING AT(200, 65535) )