Hi All,
I have 1 million records file. Using awk, I am counting the number of records. But as the number is huge, after crossing a number, awk is displaying it in exponential format.
At the end, I need to verify this count given by awk with expected count.
But as it is in exponential format, the comparision is failing.
I tried converting the exponential format to numeric using printf("%d,$0) formats , but when converting it is not giving the accurate value.
Say I have 10,93,861 records in the file. Awk is giving following output -> 1.09386e+06
When converting this exponential format to numeric, it is giving the value as10,93,860 which is incorrect.
I dont want to implement this in shell as it takes huge amount of time for the file.
Please help.
Regards,
Ssunda.