Hi everyone,
I have a text file which looks like this:
( 3,3,0 ) 0.9984104 0.000503
( 3,3,1 ) 1.000613 0.000484
( 3,3,2 ) 1.001192 0.000571
( 3,3,3 ) 1.002418 0.00063
( 3,3,4 ) 1.003345 0.000583
( 3,3,5 ) 1.000215 0.000512
( 3,3,6 ) 1.000911 0.000537
( 3,3,7 ) 0.9983607 0.000423
I want to change it to the following form.
0 0.9984104 0.000503
1 1.000613 0.000484
2 1.001192 0.000571
3 1.002418 0.00063
4 1.003345 0.000583
5 1.000215 0.000512
6 1.000911 0.000537
7 0.9983607 0.000423
There is one way that came to my mind and it was replacing each (3,3,i) with i using sed command but I believe that it is not the most intelligent way of doing it. Can anyone explain to me how to solve this problem or give me some links that can help me?