Hello,
I need to modify the 3rd field (FS=,) of the file...
1,B Lee,4,0,38,0,9.50
2,IK Pathan,3.6,0,29,3,7.25
3,L Ablish,2,0,17,2,8.50
4,PP Chawla,4,0,24,3,6.00
5,Y Singh,2,0,15,0,7.50
6,RR Powar,4,0,28,0,7.00
as below...
3.0 to 3
3.6 to 4
3.* no change
If i only had field three as input, i used the following...
awk -F. '{if ($2==0 || $2==6) printf ("%.0f",$0); else printf $0}'
Need help when the entire file is the input.
Thanks
Arun
I need to modify the 3rd field (FS=,) of the file...
1,B Lee,4,0,38,0,9.50
2,IK Pathan,3.6,0,29,3,7.25
3,L Ablish,2,0,17,2,8.50
4,PP Chawla,4,0,24,3,6.00
5,Y Singh,2,0,15,0,7.50
6,RR Powar,4,0,28,0,7.00
as below...
3.0 to 3
3.6 to 4
3.* no change
If i only had field three as input, i used the following...
awk -F. '{if ($2==0 || $2==6) printf ("%.0f",$0); else printf $0}'
Need help when the entire file is the input.
Thanks
Arun