I need the following operation to be done.
(Row1-Row1)
(Row2-Row1)
(Row3-Row1)
...
So on..
The script "awk '$1--{print}'" is not giving correct output.
For the input of
1.1
2.5
3.2
4
5
6
I got the output as
0.1
1.5
2.2
3
4
5
which is not correct..
Can you please modify the script to match requirement.
Both of your scripts are perfectly working on my data.
Thanks a ton for both of you.
Sid..
---------- Post updated at 11:49 PM ---------- Previous update was at 11:29 PM ----------
I have some files(.csv) with the following data(Example) in them.
A,1,X
B,2,Y
C,3,Z
Now I need the following output..
A,1,X
B,1,Y
C,2,Z
Where my second column got formatted as for my condition
(row1-row1)
(row2-row1)
(row3-row1)
...
So on.. and leaving all the other columns undisturbed.
I am really fond of using awk but still learning. so any help in this regard is highly appreciated.