Sponsored Content
Full Discussion: float input
Top Forums Shell Programming and Scripting float input Post 302295179 by Shahul on Friday 6th of March 2009 09:47:33 PM
Old 03-06-2009
Hi ,

For division,, you can use like this...(using awk)
Code:
 echo "test"|awk -v var1=3.3 -v var2=3 '{print var1 / var2}'

Thanks
Sha
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

expr+float argument: how can i do?

Hi everybody, I want to know how can i use the command 'expr' to manipulate float number , i have a shell bash and when (for example) i do: y1=`expr \( 1/ 16 \)` it returns 0 and if i do y1=`expr \( 1.6 / 16 \)` it returns non numeric argument. is there another command for mathematic... (4 Replies)
Discussion started by: mips
4 Replies

2. Shell Programming and Scripting

float comparison

I had a variable 1:80 8 in one varialbe say var=1:80 8 i comapred the below if then -- else ---- thought if condition is true its always going in the else condition....its not giving any compilation errror also....is there any problem bcoz of space... can some one help... (3 Replies)
Discussion started by: mkan
3 Replies

3. UNIX for Dummies Questions & Answers

Float calculations

As expr is used for integer calculations, which command is used for float calculations. (1 Reply)
Discussion started by: sharmavr
1 Replies

4. Programming

math.h: float ceilf(float x)

Good morning, I'm testing the use of ceilf: /*Filename: str.c*/ #include <stdio.h> #include <math.h> int main (void) { float ceilf(float x); int dev=3, result=0; float tmp = 3.444f; printf("Result: %f\n",ceilf(tmp)); return 0; } (1 Reply)
Discussion started by: jonas.gabriel
1 Replies

5. UNIX for Dummies Questions & Answers

input a float data and add them in shell in linux

I want to input a float data and add them in shell in linux. I am new user of it can anyone tell me how I can do it? thanx (5 Replies)
Discussion started by: purva
5 Replies

6. Programming

Float issues

i am adding two floating point numbers and i want to store in a character pointer... float f1 ; float f2 ; char *c = NULL; printf("Enter 2 floating numbers\n"); scanf("%f %f",&f1,&f2); f1 = f1+f2; sprintf(c, "%f", f1 ); when i execute this, i am... (3 Replies)
Discussion started by: pgmfourms
3 Replies

7. Shell Programming and Scripting

float to normal

I have a file with 2 columns . One of the line looks like the following. Is it possible to convert every float no in column 2 to integer. input NM_032881 6.03787973608527e-05 output 0.0000603787..... (2 Replies)
Discussion started by: quincyjones
2 Replies

8. Shell Programming and Scripting

Is there a simpler way to validate user input for float?

I'm trying to only read price (FLOAT (i.e 1.10, 3.14, etc etc)) If the input is just an integer, I will add a .00 behind. (i.e 3 becomes 3.00 , 20 becomes 20.00) If the input is without 2 decimal places, I'll add a 0. (i.e 3.1 becomes 3.10) I tried using the below code, it works but I don't... (6 Replies)
Discussion started by: andylbh
6 Replies

9. Red Hat

What is float IP?

:confused:We have two servers one active and one stand by as follows Active 202.61.9.9 Stand by 202.61.9.10 Float IP 202.61.9.8 What is use of this float IP? How it is configured? (1 Reply)
Discussion started by: manalisharmabe
1 Replies

10. Shell Programming and Scripting

Float array sum

Hi everyone, I'm having some trouble with float array. When i try to get the array sum with float numbers i get this error line 39: soma + 2.34 | bc: syntax error: invalid arithmetic operator (error token is ".34 | bc") 26 Somar() { 27 echo "Quantos numeros deseja somar?" 28 read... (4 Replies)
Discussion started by: berveglieri
4 Replies
wxGraphicsPath(3erl)					     Erlang Module Definition					      wxGraphicsPath(3erl)

NAME
wxGraphicsPath - See external documentation: wxGraphicsPath. DESCRIPTION
See external documentation: wxGraphicsPath . This class is derived (and can use functions) from: wxGraphicsObject DATA TYPES
wxGraphicsPath() : 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
moveToPoint(This::wxGraphicsPath(), P::{X::float(), Y::float()}) -> ok See external documentation . moveToPoint(This::wxGraphicsPath(), X::float(), Y::float()) -> ok See external documentation . addArc(This::wxGraphicsPath(), C::{X::float(), Y::float()}, R::float(), StartAngle::float(), EndAngle::float(), Clockwise::bool()) -> ok See external documentation . addArc(This::wxGraphicsPath(), X::float(), Y::float(), R::float(), StartAngle::float(), EndAngle::float(), Clockwise::bool()) -> ok See external documentation . addArcToPoint(This::wxGraphicsPath(), X1::float(), Y1::float(), X2::float(), Y2::float(), R::float()) -> ok See external documentation . addCircle(This::wxGraphicsPath(), X::float(), Y::float(), R::float()) -> ok See external documentation . addCurveToPoint(This::wxGraphicsPath(), C1::{X::float(), Y::float()}, C2::{X::float(), Y::float()}, E::{X::float(), Y::float()}) -> ok See external documentation . addCurveToPoint(This::wxGraphicsPath(), Cx1::float(), Cy1::float(), Cx2::float(), Cy2::float(), X::float(), Y::float()) -> ok See external documentation . addEllipse(This::wxGraphicsPath(), X::float(), Y::float(), W::float(), H::float()) -> ok See external documentation . addLineToPoint(This::wxGraphicsPath(), P::{X::float(), Y::float()}) -> ok See external documentation . addLineToPoint(This::wxGraphicsPath(), X::float(), Y::float()) -> ok See external documentation . addPath(This::wxGraphicsPath(), Path::wxGraphicsPath()) -> ok See external documentation . addQuadCurveToPoint(This::wxGraphicsPath(), Cx::float(), Cy::float(), X::float(), Y::float()) -> ok See external documentation . addRectangle(This::wxGraphicsPath(), X::float(), Y::float(), W::float(), H::float()) -> ok See external documentation . addRoundedRectangle(This::wxGraphicsPath(), X::float(), Y::float(), W::float(), H::float(), Radius::float()) -> ok See external documentation . closeSubpath(This::wxGraphicsPath()) -> ok See external documentation . contains(This::wxGraphicsPath(), C::{X::float(), Y::float()}) -> bool() Equivalent to contains(This, C, []) . contains(This::wxGraphicsPath(), X::float() | term(), X::float() | term()) -> bool() See external documentation . Alternatives: contains(This::wxGraphicsPath(), X::float(), Y::float()) -> contains(This,X,Y, []) contains(This::wxGraphicsPath(), C::{X::float(),Y::float()}, [Option]) -> bool() Option = {fillStyle, integer()} contains(This::wxGraphicsPath(), X::float(), Y::float(), Options::[Option]) -> bool() Types Option = {fillStyle, integer()} See external documentation . getBox(This::wxGraphicsPath()) -> {X::float(), Y::float(), W::float(), H::float()} See external documentation . getCurrentPoint(This::wxGraphicsPath()) -> {X::float(), Y::float()} See external documentation . transform(This::wxGraphicsPath(), Matrix::wxGraphicsMatrix() (see module wxGraphicsMatrix)) -> ok See external documentation . AUTHORS
<> wxErlang 0.98.9 wxGraphicsPath(3erl)
All times are GMT -4. The time now is 03:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy