Hi,
How can I add a same number to a column using awk?
For example,
If I have a file as:
1.1 1.1 1.1 1.1
2 2 2 2
3.1 4.2 5 6
I need to add 0.01 on third column. My output must be:
1.1 1.1 1.11 1.1
2 2 2.01 2
3.1 4.2 5.01 6
And how can I add, for example 2 columns and its result put in
last position. Above example before, if want to add column 2 and 3, and put its result in last position of each row. How I can do it?
Thanks.
How can I add a same number to a column using awk?
For example,
If I have a file as:
1.1 1.1 1.1 1.1
2 2 2 2
3.1 4.2 5 6
I need to add 0.01 on third column. My output must be:
1.1 1.1 1.11 1.1
2 2 2.01 2
3.1 4.2 5.01 6
And how can I add, for example 2 columns and its result put in
last position. Above example before, if want to add column 2 and 3, and put its result in last position of each row. How I can do it?
Thanks.