08-29-2005
Quote:
Originally Posted by limshady411
I am trying to create a script that will read from a file two non-integer values (decimals) and add those values together. For example, I want to add 1.51 and -2.37 together and get the sum. Any ideas? Thanks!
search the forums for '
float'.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a issue... Is it possible to compare integer value with decimal value.
If it is not possible,then how can i compare 2 decimal values in born shell.thanks! (3 Replies)
Discussion started by: MARY76
3 Replies
2. Shell Programming and Scripting
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 (4 Replies)
Discussion started by: idro
4 Replies
3. UNIX for Advanced & Expert Users
Hi All,
Is there any command which can convert binary decimal coded values to ascii values...
i have bcd values like below
оооооооооооо0о-- -v -
Pls suggest a way to convert this.
Thanks,
Deepti.Gaur (3 Replies)
Discussion started by: gaur.deepti
3 Replies
4. Shell Programming and Scripting
The shell mentioned below will show a warning if the page takes more than 6 seconds to load.
The problem is that myduration variable is not an integer. How do I convert it to integer?
myduration=$(curl http://192.168.50.1/mantisbt/view.php?id=1 -w %{time_total}) > /dev/null ; ] && echo... (3 Replies)
Discussion started by: shantanuo
3 Replies
5. UNIX for Dummies Questions & Answers
i need to do camparisions like the below.
For the case when first=10 and second=9.9 the scripts displays process failed.
I need to be able to convert the values to integer before doing the comparision.
Like 9.9 should be rounded over to 10 before doing comparision.
Please advice how can... (3 Replies)
Discussion started by: nehagupta
3 Replies
6. Shell Programming and Scripting
From strings stored in variables, I need to isolate and use the first numerical value contained within them. I will need to know how to produce an integer as well as a floating point decimal. It needs to work on any string regardless of what types of characters (if any) are preceding or following... (3 Replies)
Discussion started by: bradlecat
3 Replies
7. Shell Programming and Scripting
Using below command
awk 'NR==FNR{A=$1;next}
{sum+=($2*A)}END{OFMT="%20f";print int(sum)}' Market.txt Product.txt
answer:351770174.00000
how to convert this to 351770174.
when i try with below command i am getting different result.
awk 'NR==FNR{A=$1;next}... (3 Replies)
Discussion started by: katakamvivek
3 Replies
8. Shell Programming and Scripting
Hi Experts,
Need your advice.
I have a csv file in which column value can contain two integer post decimal(like 1.00, 13.00,12.15, 2.43) or blank.
Tried the below code but not working.
awk -F "|" '{
if ($39 !~ /^+\.{2}$ || $39 != "") {print "165: Quantity decimal values are not correct... (2 Replies)
Discussion started by: as7951
2 Replies
9. Shell Programming and Scripting
Hi guys...
I am loving this integer maths thing.
64 bit systems are certainly easier than 32 bit, but hey, I don't intend to leave out my fav' platform.
Using one of the 'Brothers' methods, URL inside the code.
#!/bin/sh
#
# #!/usr/local/bin/dash
# e_constant.sh
# Brother's formula .
#... (2 Replies)
Discussion started by: wisecracker
2 Replies
LEARN ABOUT LINUX
wximagelist
wxImageList(3erl) Erlang Module Definition wxImageList(3erl)
NAME
wxImageList - See external documentation: wxImageList.
DESCRIPTION
See external documentation: wxImageList .
DATA TYPES
wxImageList() :
An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc
or distributed for use on other nodes.
EXPORTS
new() -> wxImageList()
See external documentation .
new(Width::integer(), Height::integer()) -> wxImageList()
Equivalent to new(Width, Height, []) .
new(Width::integer(), Height::integer(), Options::[Option]) -> wxImageList()
Types Option = {mask, bool()} | {initialCount, integer()}
See external documentation .
add(This::wxImageList(), Bitmap::wxBitmap() (see module wxBitmap)) -> integer()
See external documentation .
add(This::wxImageList(), Bitmap::wxBitmap() (see module wxBitmap), X::term()) -> integer()
See external documentation .
Alternatives:
add(This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap()) -> integer()
add(This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:colour()) -> integer()
create(This::wxImageList(), Width::integer(), Height::integer()) -> bool()
Equivalent to create(This, Width, Height, []) .
create(This::wxImageList(), Width::integer(), Height::integer(), Options::[Option]) -> bool()
Types Option = {mask, bool()} | {initialCount, integer()}
See external documentation .
draw(This::wxImageList(), Index::integer(), Dc::wxDC() (see module wxDC), X::integer(), Y::integer()) -> bool()
Equivalent to draw(This, Index, Dc, X, Y, []) .
draw(This::wxImageList(), Index::integer(), Dc::wxDC() (see module wxDC), X::integer(), Y::integer(), Options::[Option]) -> bool()
Types Option = {flags, integer()} | {solidBackground, bool()}
See external documentation .
getBitmap(This::wxImageList(), Index::integer()) -> wxBitmap() (see module wxBitmap)
See external documentation .
getIcon(This::wxImageList(), Index::integer()) -> wxIcon() (see module wxIcon)
See external documentation .
getImageCount(This::wxImageList()) -> integer()
See external documentation .
getSize(This::wxImageList(), Index::integer()) -> {bool(), Width::integer(), Height::integer()}
See external documentation .
remove(This::wxImageList(), Index::integer()) -> bool()
See external documentation .
removeAll(This::wxImageList()) -> bool()
See external documentation .
replace(This::wxImageList(), Index::integer(), Bitmap::wxBitmap() (see module wxBitmap)) -> bool()
See external documentation .
replace(This::wxImageList(), Index::integer(), Bitmap::wxBitmap() (see module wxBitmap), Mask::wxBitmap() (see module wxBitmap)) -> bool()
See external documentation .
destroy(This::wxImageList()) -> ok
Destroys this object, do not use object again
AUTHORS
<>
wxErlang 0.98.9 wxImageList(3erl)