![]() |
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 |
| Add leading zeroes to numbers in a file | raidzero | Shell Programming and Scripting | 3 | 06-17-2008 12:06 PM |
| adding zeroes to all single digits | ganiel24 | Shell Programming and Scripting | 3 | 06-16-2008 10:59 AM |
| appending | mohan705 | Shell Programming and Scripting | 6 | 07-11-2007 08:59 AM |
| How to trim the leading zeroes in a Currency field ? | Amruta Pitkar | Shell Programming and Scripting | 22 | 05-29-2007 05:45 AM |
| appending and sed | scotty_123 | Shell Programming and Scripting | 1 | 04-26-2007 08:13 AM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Hi Friends,
I am new to scripting and i have a problem .I am using /bin/tcsh and want to multiply two decimal numbers and compare the result with another decimal number.The situation is as below.......There are three decimal numbers..... a=6.10 , b=3.10 , Value=18.91000000 I tried bc to multiply as below...... c=`echo "scale=8; $a * $b "|bc`; echo "$c"; But the value of "c" is coming as 18.9100.And when i compare "c" with "Value" for equality,the result is coming as false...... ![]() Can anyone help me out so that the value of "c" can be made 18.91000000 i.e filling zeros for remaining places ,upto 8 decimal places....... Thanks Very Much in advance..... |
| Bookmarks |
| Tags |
| awk, awk trim, trim, trim awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|