I have a text file which has 4 columns with 300 lines. I want to add 5th columns where 1st hundred lines will be multiplication of 1*0.02, 2*0.02... and from hundred one lines 2.2, 2.4 ...
0.02
0.04
.
.
.
2 (in 100 lines)
2.2
2.4
.
.
.
12 (in 300 lines)
my text file:
# "Frame" "Timestep" "WignerSeitz.interstitial_count" "WignerSeitz.vacancy_count"
0 0 0 0
1 100 0 0
2 200 0 0
3 300 0 0
.
.
98 9800 16 16
99 9900 16 16
100 10000 15 15
.
.
299 29900 48 48
300 30000 55 55
expected output:
# "Frame" "Timestep" "WignerSeitz.interstitial_count" "WignerSeitz.vacancy_count"
0 0 0 0 0
1 100 0 0 0.02
2 200 0 0 0.04
3 300 0 0 0.06
.
.
98 9800 16 16 1.96
99 9900 16 16 1.98
100 10000 15 15 2
.
.
299 29900 48 48 11.8
300 30000 55 55 12