![]() |
|
|
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 |
| mail function problem | jwholey | Shell Programming and Scripting | 4 | 05-01-2008 12:21 PM |
| problem, with if condition in function | gurukottur | Shell Programming and Scripting | 4 | 04-24-2008 03:57 PM |
| PERL function problem | avadhani | Shell Programming and Scripting | 2 | 06-15-2005 05:18 AM |
| Problem with the strlen function in ksh | steiner | Shell Programming and Scripting | 3 | 07-24-2003 09:39 AM |
| rexec() function problem | lcmoreno | High Level Programming | 7 | 01-08-2002 10:19 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
problem in awk int() function
awk -vwgt=$vWeight -vfac=$vFactor '
BEGIN { printf("wgt:" wgt "\n"); printf("factor:" fac "\n"); total = sprintf("%.0f", wgt * fac); total2 = sprintf("%.0f", int(wgt * fac)); printf("total:" total "\n"); printf("total2:" total2 "\n"); } ' if vWeight=326.4 vFactor=100 the result would be: total:32640 total2:32639 Could anyone know how is 32639 calucated? thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|