![]() |
|
|
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 |
| Converting integer to String | ROOZ | Shell Programming and Scripting | 1 | 06-05-2008 02:38 PM |
| Compare integer value with decimal | MARY76 | Shell Programming and Scripting | 3 | 07-25-2007 10:47 AM |
| Checking if string contains integer | haz | Shell Programming and Scripting | 7 | 09-11-2006 03:51 AM |
| conersting string to integer | abb058 | UNIX for Dummies Questions & Answers | 2 | 08-23-2006 08:52 AM |
| Integer to String | psilva | High Level Programming | 2 | 08-17-2001 01:14 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
how to compare string & integer in unix
Hi All,
i am doung sup up of amount column in my file. tot_val=`awk '{a+=$0}END{printf "%.5f\n",a}' amount` then i have a checksum in footer. chk_sum=`tail -1 $FILE_NAME | cut -d~ -f7 | cut -c2-` but the problem is while executing 1st command i am getting : 27720.75000 & while executing second command i am getting : 00000000000000000027720.75000 if i compare it, i am getting these values are not equal. Can someone help me. what should i change so that it can work. |
| Bookmarks |
| Tags |
| awk, awk trim, comparision, trim, trim awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|