12-03-2007
How to eliminate inf value in AWK
Hi,
I have the calculations which return me infinity (inf), -inf, other very larger number when I printed them out.
I did try to insert some control condition not to print these out if the above condition is met. The code I implemented is something like:-
for (i=0;i<=1000;i++){
if(count[i] !="inf"|| count[i] !="-inf" ||count[i]!<0 ||count[i]!>0){
printf("%.2f %0d\n", count[i], i);}}
}
However the above doesnt work. It still prints out these condition. Anyone here know what is the most likely mistakes I made here.
Thanks.
-Jason
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Anyone would know how to get rid off a message that comes up during a boot-up on Solaris? It says that the clusters for this software are not installed. I deleted the software because it was crashing some other stuff but it did not get rid off all the stuff.
Yes, I am coming from windows and... (2 Replies)
Discussion started by: softarch
2 Replies
2. HP-UX
Hi,
Does anyone seem this kind of output from uptime and top where "load average: inf, inf, inf"
is this possible problem with the processor?
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.10 5.4% 0.0% 4.0% 90.6% 0.0% 0.0% 0.0% 0.0%... (1 Reply)
Discussion started by: robertngo
1 Replies
3. Solaris
Hi All,
I have configured the tomcat 6.0.26 and it is working fine in Solaris.
Testing JSP and SERVLET program I ensured tomcat is configured properly (My guess).
-------------------
Now I placed my Servlet and JSP code under /users/kalai/sample.
I have created a soft link to... (1 Reply)
Discussion started by: kalpeer
1 Replies
4. Shell Programming and Scripting
Could any one help me to compare the date value say at 10th column with sysdate (i.e current date) and if diffrence is more than 50 days then filter them out from the file. The file contain 10000 records.
head file
00971502657744 A671FAHP2EW8BG1369172011HRWS contact information ... (6 Replies)
Discussion started by: zooby
6 Replies
5. Shell Programming and Scripting
Hi,
I am trying to create a text file from data retrieved from a query.The data retrieved is having this character '^L' at regular intervals of the data.
How can i eliminate this, Please find below the sample data.
I tried sed -e "s/\^L//g" to convert it, but with no luck
^LCODE*SERIAL... (11 Replies)
Discussion started by: ramkiran77
11 Replies
6. Shell Programming and Scripting
consider the below output
cat tablextract2.sql
CREATE PROCEDURE after72DeleteTgr(id int)
BEGIN
END
$$
Delimiter ;
CREATE PROCEDURE after72DeleteTgr(id int)
BEGIN
END
$$
Delimiter ;
#
# proc_name1="after72DeleteTgr"
#
# echo "`awk '{if($3~v){a=1}}a;/elimiter\|DELIMITER/{exit}'... (17 Replies)
Discussion started by: vivek d r
17 Replies
7. Shell Programming and Scripting
Hi All,
I have two files in the directory
file1.txt
file2.txt
I gave ls -m > output.txt command and I got the output as
file1.txt, file2.txt, output.txt
But my output should be like
file1.txt, file2.txt
Thanks in advance. (6 Replies)
Discussion started by: dubuku_01
6 Replies
8. Shell Programming and Scripting
Hi All,
Please help me how to remove the records from the file if it is having more number of fields than the required one, before loading into stage
Here is the sample records. File is space delimited one
chandu 1121324 CC ( 2 spaces)
chandu balu 434657 DD (3 spaces) -- failing due to... (10 Replies)
Discussion started by: bbc17484
10 Replies
9. Shell Programming and Scripting
Hi All,
Seeking for your assistance on my problem below:
What i did was extract the records from database and change the extension name to .csv. My problem is there is a records contains comma between records if i opened it in excel it will generate the comma as new field(please see below... (6 Replies)
Discussion started by: znesotomayor
6 Replies
LEARN ABOUT MOJAVE
cacosh
CACOSH(3) BSD Library Functions Manual CACOSH(3)
NAME
cacosh -- complex inverse hyperbolic cosine function
SYNOPSIS
double complex
cacosh(double complex z);
long double complex
cacoshl(long double complex z);
float complex
cacoshf(float complex z);
DESCRIPTION
cacosh(z) computes the inverse hyperbolic cosine of the complex floating-point number z, with a branch cut on the interval [-inf, 1] along
the real axis.
cacosh() returns values in a half-strip of the complex plane with positive real part and imaginary part in the interval [-Pi, Pi].
For all complex floating point numbers z, cacosh(conj(z)) = conj(cacosh(z)).
SPECIAL VALUES
The conjugate symmetry of cacosh() is used to abbreviate the specification of special values.
cacosh(+-0 + 0i) returns 0 + Pi/2 i.
cacosh(x + inf i) returns inf + Pi/2 i, for finite x.
cacosh(x + NaN i) returns NaN + NaN i, for finite nonzero x.
cacosh(-inf + yi) returns inf + Pi i, for finite positive-signed y.
cacosh(inf + yi) returns inf + 0i, for finite positive-signed y.
cacosh(-inf + inf i) returns inf + 3Pi/4 i.
cacosh(inf + inf i) returns inf + Pi/4 i.
cacosh(+-inf + NaN i) returns inf + NaN i.
cacosh(NaN + yi) returns NaN + NaN i, for finite y.
cacosh(NaN + inf i) returns inf + NaN i.
cacosh(NaN + NaN i) returns NaN + NaN i.
NOTES
SEE ALSO
ccosh(3) complex(3)
STANDARDS
The cacosh() function conforms to ISO/IEC 9899:2011.
4th Berkeley Distribution December 11, 2006 4th Berkeley Distribution