AIX's "bc" Command: Doing a Conditional Expression?
Hello All,
I'm trying to issue a conditional expression using "bc" on floating point numbers. I had this working on my linux box,
but as soon as I transferred the file over to an AIX Server, it would not work anymore...
This is the "WORKING" command on linux (below), which I can't seem to figure out how to do on AIX's Version of "bc". I've read
the manpage which didn't have a very good explaination for it, except that, I believe the ONLY way you can use those
relational operators is in an if|for|while statements/loops...
So I think I have to somehow convert this to a "bc" If Statement.
Anyone know how this is done?
I have 2000 files named like "file-fr0000.log", "file-fr1999.log"...
I wanna generate the file names automatically in the following c shell script:
set fr = 0
while ($fr <= 1999)
grep "ENERGY" file-fr$fr.log > data.dat
@ fr = ( $fr + 1 )
end
The above will generate file names... (3 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Hello All,
I am running source command on my project configuration file app.cfg which has conditional statements with make file systax E.g ifeq ($(APP_CMP_DIR),trunk).
When I source this file it throws error: syntax error near unexpected token... (1 Reply)
Hello,
I am reading one of the AIX manuals about shell scripting and (AIX 5) and I found this example when introducing to functions:
function usage
{
prog="$1"; shift
print -u2 "$prog: usage: $prog $@"
exit 1
}
This example is meant to be easy but I don't understand what it is... (5 Replies)
Hi, everyone.
I need to write a program to get io info based on libperfstat.
But the "write time" of a disk is just half of the value get from iostat.
I'm confused and can't explain. Help please.
How I calculate "write service time per sec":
In iostat:
write service... (0 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
LEARN ABOUT SUNOS
isgreater
isgreater(3M) Mathematical Library Functions isgreater(3M)NAME
isgreater - test if x greater than y
SYNOPSIS
#include <math.h>
int isgreater(real-floating x, real-floating y);
DESCRIPTION
The isgreater() macro determines whether its first argument is greater than its second argument. The value of isgreater(x, y) is equal to
(x) > (y); however, unlike (x) > (y), isgreater(x, y) does not raise the invalid floating-point exception when x and y are unordered.
RETURN VALUES
Upon successful completion, the isgreater() macro returns the value of (x) > (y).
If x or y is NaN, 0 is returned.
ERRORS
No errors are defined.
USAGE
The relational and equality operators support the usual mathematical relationships between numeric values. For any ordered pair of numeric
values, exactly one of the relationships (less, greater, and equal) is true. Relational operators can raise the invalid floating-point
exception when argument values are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered relationship is true. This
macro is a quiet (non-floating-point exception raising) version of a relational operator. It facilitates writing efficient code that
accounts for quiet NaNs without suffering the invalid floating-point exception. In the SYNOPSIS section, real-floating indicates that the
argument is an expression of real-floating type.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO isgreaterequal(3M), isless(3M), islessequal(3M), islessgreater(3M), isunordered(3M), math.h(3HEAD), attributes(5), standards(5)SunOS 5.10 1 Nov 2003 isgreater(3M)