![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Numeric Validation | sumesh.abraham | Shell Programming and Scripting | 12 | 08-04-2008 10:10 AM |
| Perl code to differentiate numeric and non-numeric input | Raynon | Shell Programming and Scripting | 11 | 08-04-2007 10:32 AM |
| Converting exponential values | rleebife | Shell Programming and Scripting | 2 | 08-02-2007 11:59 PM |
| Checking numeric value | malaymaru | Shell Programming and Scripting | 6 | 05-25-2007 08:42 PM |
| non-numeric argument | TiredOrangeCat | UNIX for Dummies Questions & Answers | 3 | 02-13-2007 02:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Conversion of Exponential to numeric in awk- not correct output
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. |
|
||||
|
I am not just taking the count of records. In addition to that I am also doign some processing and validations.
I tried to check the version of awk using awk -v and awk --version but is displaying usage of awk only. OS is Unix Regards, ssunda. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|