![]() |
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 |
| Converting integer to String | ROOZ | Shell Programming and Scripting | 1 | 06-05-2008 01:38 PM |
| Compare integer value with decimal | MARY76 | Shell Programming and Scripting | 3 | 07-25-2007 09:47 AM |
| unix script for converting a decimal to binary | softy | Shell Programming and Scripting | 3 | 10-19-2005 09:33 AM |
| Help: How do I ADD non-integer (decimal) values? | limshady411 | Shell Programming and Scripting | 2 | 09-07-2005 04:41 AM |
| command for converting string to integer | esham | Shell Programming and Scripting | 1 | 08-04-2005 07:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Converting a decimal into integer
Hi all,
I'm trying to convert a decimal number into an integer number; I'm doing this: n=`echo |awk '{ print "'"$mem"'"*10}'` where the variable mem is equal to 3.7 I'd like to obtain 37, but the expression above gives me 30. Help please!!!! thx a lot |
|
||||
|
Quote:
Code:
n=`echo "$mem * 10" | bc` |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|