Hi
I have a file that looks like this
198606010000 1139.0000 403.3000
test1 1514.0000 487.7000
1814.0000 540.0000
2114.0000 611.5000
198606270000 717.0000 0.0000
test2 1654.0000 287.0000
2727.0000 558.0000
3012.0000 610.0000
4209.0000 832.0000
4365.0000 858.0000
4683.0000 905.0000
4868.0000 941.0000
I need to repeat the number in column1 198606010000 in all the records as the first field overwriting the text test1 until i reach to the second number 198606270000 and so on so the file looks like this
198606010000 1139.0000 403.3000
198606010000 1514.0000 487.7000
198606010000 1814.0000 540.0000
198606010000 2114.0000 611.5000
198606270000 717.0000 0.0000
198606270000 1654.0000 287.0000
198606270000 2727.0000 558.0000
198606270000 3012.0000 610.0000
I can probably do this in excel but the file is huge so I was wondering if this is possible in AWK.
I have a file that looks like this
198606010000 1139.0000 403.3000
test1 1514.0000 487.7000
1814.0000 540.0000
2114.0000 611.5000
198606270000 717.0000 0.0000
test2 1654.0000 287.0000
2727.0000 558.0000
3012.0000 610.0000
4209.0000 832.0000
4365.0000 858.0000
4683.0000 905.0000
4868.0000 941.0000
I need to repeat the number in column1 198606010000 in all the records as the first field overwriting the text test1 until i reach to the second number 198606270000 and so on so the file looks like this
198606010000 1139.0000 403.3000
198606010000 1514.0000 487.7000
198606010000 1814.0000 540.0000
198606010000 2114.0000 611.5000
198606270000 717.0000 0.0000
198606270000 1654.0000 287.0000
198606270000 2727.0000 558.0000
198606270000 3012.0000 610.0000
I can probably do this in excel but the file is huge so I was wondering if this is possible in AWK.