I want to insert a column the following file using awk. File structure:
1.05228541071
1.04732408695
1.04255736847
1.03783173687
1.03314654421
1.02850114709
...
I was using the following command to add a column (from 0 days).
awk '{print x+0, $1; x+=73}' file >file_vs_days
And I get the following result for each row:
file_vs_days:
0 1.05228541071
73 1.04732408695
146 1.04255736847
219 1.03783173687
292 1.03314654421
365 1.02850114709
...
My problem is in the next row (7th), I want it to start at 365 instead of 365 + 73.
For example:
0 1.05228541071
73 1.04732408695
146 1.04255736847
219 1.03783173687
292 1.03314654421
365 1.02850114709
365 x7
(365+1*73) x8
(365+2*73) x9
(365+3*73) x10
(365+4*73) x11
(365+5*73) x12
...
How can I modify the command to print the values every 6 rows?.
Thanks in advance.