Sponsored Content
Top Forums Shell Programming and Scripting Finding absolute values greater than a certain value Post 302373796 by jim mcnamara on Sunday 22nd of November 2009 05:27:08 AM
Old 11-22-2009
The OP wants the equivalent of the abs() function
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding absolute pathnames longer than 100 characters

Please help. This simple problem is really stumping me. Is there are way to find absolute pathnames for all files on your system that are longer than 100 characters? I'm using bash shell to attempt it, but have come up with nothing so far. I appreciate any help offered. Nauty (2 Replies)
Discussion started by: nauty
2 Replies

2. Shell Programming and Scripting

Finding files with names that have a real number greater then difined.

I am trying to find all files in a directory whose name has a real number larger then the number I am looking for. For example: . |-- delta.1.5.sql |-- delta.2.1.sql |-- delta.2.2.sql |-- delta.2.3.sql |-- delta.2.4.sql `-- delta.2.5.sql I know my database is at 2.2 so I want an... (2 Replies)
Discussion started by: harmonwood
2 Replies

3. Shell Programming and Scripting

Important finding --- find files greater than 1 MB

as we can find file greater than 1 MB with find command as: find /dir -name '*' -size +1M find /dir/* -name '*' -size +1M but wats its doing is , its finding files only in current directory not in sub-directories. i want files from sub-directories too. Please help... Thanx in... (3 Replies)
Discussion started by: manoj_dahiya22
3 Replies

4. Shell Programming and Scripting

finding values in between

Hi, I have been trying to find someone with this similar problem but I was out of luck. So I have a file that has two columns that look like this (for example): 10 20 40 50 45 60 90 130 So column 1 is start and column 2 is stop but what I want to do is find whats not represented... (4 Replies)
Discussion started by: phil_heath
4 Replies

5. UNIX for Advanced & Expert Users

Finding causes of slabinfo values

I'm doing a little work on assessing and improving server stability. As part of that, we're reviewing the contents of /proc/slabinfo. We see that sometimes a certain metric-- say, buffer_head-- spike prior to server instability. We're interested in learning what contributes to that as we trace... (0 Replies)
Discussion started by: treesloth
0 Replies

6. Shell Programming and Scripting

Choosing between repeated entries based on the "absolute values" of a column

Hello, I was looking for a way to select between the repeated entries (column1) based on the values of absolute values of column 3 (larger value). For example if the same gene id has FC value -2 and 1, I should get the output as -2. Kindly help. GeneID Description FC ... (2 Replies)
Discussion started by: Sanchari
2 Replies

7. Shell Programming and Scripting

awk to get values greater than

data.txt August 09 17:16 2013 August 09 17:17 2013 August 09 17:19 2013 August 09 17:20 2013 August 09 17:21 2013 August 09 17:22 2013 August 09 17:23 2013 August 09 17:24 2013 to print from a point in this file, to the end of the file, i type: awk '/August 09 17:22/,0' data.txt. ... (1 Reply)
Discussion started by: SkySmart
1 Replies

8. Shell Programming and Scripting

Help me to find a greater than or smaller than values

Hi, i need to find one of the value from my file is in between two numbers, that is the value is greater than 34 and smaller than 50, Ex: File.txt col1 col2 col3 col4 1 Name1 93 w 2 Name2 94 a 3 Name3 32 b 4 Name4 45 x 5 Name5 50 y 6 Name6 49 z here i need to find col3 values are... (7 Replies)
Discussion started by: Shenbaga.d
7 Replies

9. Shell Programming and Scripting

How to print values that are greater than 0.1 in at least 80% of the samples?

input sample1 sample2 sample3 sample4 sample5 sample6 sample7 sample8 sample9 sample10 v1 0.2 0.1 0.1 0 1 2 3 4 9 10 v2 0 0 0.01 0 0 0 0 0 0 0 v3 0 0 0 0 0 ... (35 Replies)
Discussion started by: quincyjones
35 Replies

10. UNIX for Beginners Questions & Answers

How to replace the field values, which are greater than the specified value with TRUE?

I have a csv file as given below, org1 org2 org3 org4 org5 gene1 100 80 90 80 150 gene2 30 70 50 50 115 gene3 40 120 60 40 105 gene4 20 72 40 60 20 I need to replace the fields are having values greater than 100 with "TRUE". I used the following commands to replace... (6 Replies)
Discussion started by: dineshkumarsrk
6 Replies
ABS(3)							     Linux Programmer's Manual							    ABS(3)

NAME
abs, labs, llabs, imaxabs - compute the absolute value of an integer. SYNOPSIS
#include <stdlib.h> int abs(int j); long int labs(long int j); long long int llabs(long long int j); #include <inttypes.h> intmax_t imaxabs(intmax_t j); DESCRIPTION
The abs() function computes the absolute value of the integer argument j. The labs(), llabs() and imaxabs() functions compute the absolute value of the argument j of the appropriate integer type for the function. RETURN VALUE
Returns the absolute value of the integer argument, of the appropriate integer type for the function. CONFORMING TO
SVID 3, POSIX.1, BSD 4.3, ISO/IEC 9899 (C99). POSIX.1 (1996 edition) only requires the abs() function. ISO/IEC 9899:1990 (C89) only includes the abs() and labs() functions; the functions llabs() and imaxabs() were added in C99. NOTES
Trying to take the absolute value of the most negative integer is not defined. The llabs() function is included in glibc since version 2.0, but is not in libc5 or libc4. The imaxabs() function is included in glibc since version 2.1.1. For llabs() to be declared, it may be necessary to define _ISOC99_SOURCE or _ISOC9X_SOURCE (depending on the version of glibc) before including any standard headers. GCC handles abs() and labs() as builtin functions. GCC 3.0 also handles llabs() and imaxabs() as builtins. SEE ALSO
ceil(3), floor(3), fabs(3), rint(3) GNU
2000-12-17 ABS(3)
All times are GMT -4. The time now is 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy