![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiply variables | Anita Flejter | Shell Programming and Scripting | 2 | 05-06-2008 04:03 PM |
| multiply variable | fwabbly | Shell Programming and Scripting | 4 | 07-28-2007 02:26 PM |
| gawk multiply one field | pau | Shell Programming and Scripting | 2 | 05-28-2006 10:01 AM |
| How to Convert scientific notation to normal ? | maheshsri | Shell Programming and Scripting | 2 | 01-05-2006 10:33 AM |
| Easy UNIX notation question | lavaghman | UNIX for Dummies Questions & Answers | 1 | 06-05-2002 12:20 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I'm need to do some addition and multiplication of scientific nottaion numbers, in the form 34.23423e-10 for example. I was echoing the list of numbers to stdout, then using bc -l, then I find that this does not seem to work for numbers with exponential notation. Could someone help me out here? I want to do somethng like 'a - b*3=?' Thanks! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Well in ksh,
$ scicalc() { awk 'END { print '"$*"'}' < /dev/null ; return $? ; } $ set -f $ scicalc 3.2e2 + 1e3 * 3 3320 $ That "set -f" turns off globbing so the * is not expanded into a list of filenames. |
||||
| Google The UNIX and Linux Forums |