I have a .txt file and I'm trying to add float number at the end of each line with incremented value than the last line. This is what I have in the .txt file:
>520.980000 172.900000 357.440000
>320.980000 192.900000 357.441000
>325.980000 172.900000 87.440000
and I'm trying to have this result:
>520.980000 172.900000 357.440000 1.1
>320.980000 192.900000 357.441000 1.2
>325.980000 172.900000 87.440000 1.3
But can't seem to figure out how to iterate and increment the data.
EDIT:
as @Daweo recommended I put my comment in the edit section due to formatting problem in the comment section. So I have a sequence of frames as below and I want to give for each group of sequence a number and incresing it for the following, for exemple: the group with the 0 index (the first column)I will add 1 at the end of each line, the next with index 1 I will add 2 at the end of each line and so on:
0 0 0 0 -1.793451 296.744956 161.752147 455.226042 292.372804
0 1 0 0 -1.936993 737.619499 161.531951 931.112229 374.000000
0 2 0 0 -2.523309 1106.137292 166.576807 1204.470628 323.876144
1 -1 -1 -1 -10.000000 228.120000 183.030000 258.830000 217.340000
1 -1 -1 -1 -10.000000 59.210000 191.300000 137.370000 227.430000
1 0 0 0 -1.796862 294.898777 156.024256 452.199718 284.621269 2.000000
1 1 0 0 -1.935205 745.017137 156.393157 938.839722 374.000000 1.739063
1 2 0 0 -2.530402 1138.342096 160.872449 1223.338201 324.146788
2 -1 -1 -1 -10.000000 236.270000 175.500000 267.210000 211.030000
2 -1 -1 -1 -10.000000 68.906000 183.810000 145.870000 224.020000
2 0 0 0 -1.800343 293.093560 150.470149 449.259225 277.104290 2.000000