The source file will come at 4 precision values (file1).if the value is 123.42 it will not display as 123.4200 and 123.4 will not be 123.4000 and 0 will not come in as 0.0000
I Need to display it padding with 0's at the end until it becomes 4 precision points .I have searched in this forum for answers before posting, my requirement is based on input,
I need to pad 0's so that i can compare it with file2
ex:
0 should be 0.0000
1.2 should be 1.2000
-5.023 should be -5.0230
6.2345 should be 6.5345
Thanks Anbu ..its working fine..i am facing a starnge issue now:)
command given by you works fine if there is no control m appended at the end of the line or else it will display 0.0000 ....is there any way i can remove controlm from the file and then use the awk command...i tried with sed but it is not working
sed 's/^M//g' abc.csv > def.csv
mv def.csv abc.csv
awk -F"," ' NR > 1 { printf("%.04f",$3) } ' abc.csv
0.0000
vi abc.csv
As Of Date,Count,Checksum^M
01/31/2014,3702,-170552450514.86^M