Dear friends,
please help me to solve following problem.
I'm running a frontend application from which i'll be invoking the shell script with arguments as given below
-driver -w -p "ABC XYZ" -S -ds con -dn "abc xyz"
i am getting
$1=-driver
$2=-w
$3=-p
$4="ABC
$5=XYZ"
$6=-S
$7=-ds... (3 Replies)
Hi Friends,
I am new to this forum as well as new to shell scripting.
I have a problem here and i need someone to solve this.
Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument .
There... (0 Replies)
Hi All,
Can anybody help me to write the umbrella script for the following?
I have three steps to do.
STEP 1: CONVERT XML files to PS files
STEP 2: CONVERT ALL PS FILES TO PDF FILES
STEP 3: FTPING ALL PDF FILES TO THE SERVER.
I have the codes for the above three steps.
Now I... (6 Replies)
Hello All,
Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation.
I tried providing the input file as the value for password field but password change requires tty so my password from an input file... (3 Replies)
Hey everyone, I was wondering if i am able to write a sed command to round a number to two decimal places. So for example:
1.58674
would be
1.58
I just want to chop off the numbers to the right of the second digit after the period. I know this is probably trivial but the closest i got was... (8 Replies)
From the attached file I to need pick all rows that have AVG2 column value larger than 0.050, and write those values in to a separate file. Help me on how I pick the approp value & output them onto a file.
Very Thanks in advance. :b: (5 Replies)
Hi Guys,
i am having a csv file where i need to round off numerical column to 2 decimal precision in specific columns. i need to ignore the first two line i.e the header columns and manipulate rest of the lines of the csv file. My columns are specific i.e i need to round off only 2nd,4th and... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
LEARN ABOUT ULTRIX
trunc
floor(3m)floor(3m)Name
floor, ffloor, fabs, ceil, ceil, trunc, ftrunc, fmod, rint - floor, absolute value, ceiling, truncation, floating point remainder and
round-to-nearest functions
Syntax
#include <math.h>
double floor(x)
double x;
float ffloor(x)
float x;
double ceil(x)
double x;
float fceil(x)
float x;
double trunc(x)
double x;
float ftrunc(x)
float x;
double fabs(x)
double x;
double fmod (x, y)
double x, y;
double rint(x)
double x;
Description
The and routines return the largest integer which is not greater than x for double and float data types, respectively.
The and routines return the smallest integer which is not less than x for double and float data types, respectively.
The and routines return the integer (represented as a floating-point number) of x with the fractional bits truncated for double and float
data types respectively.
The routine returns the absolute value |x|.
The routine returns the floating point remainder of the division of x by y: zero if y is zero or if x/y would overflow; otherwise the num-
ber f with the same sign as x, such that x = iy + f for some integer i, and |f| < |y|.
The routine returns the integer (represented as a double precision number) nearest x in the direction of the prevailing rounding mode.
In the default rounding mode, to nearest, is the integer nearest x with the additional stipulation that if |rint(x)-x|=1/2 then is even.
Other rounding modes can make act like or or round towards zero.
Another way to obtain an integer near x is to declare (in C)
double x; int k; k = x;
The C compiler rounds x towards 0 to get the integer k. Also note that, if x is larger than k can accommodate, the value of k and the
presence or absence of an integer overflow are hard to predict.
The routine is in libc.a rather than libm.a.
See Alsoabs(3), ieee(3m), math(3m)
RISC floor(3m)