Hello Experts,
I have got a txt files which has multiple columns, I want to get the max, min and diff (max-min) for each column in the same txt file. Example:
cat file.txt
I want ouput like:
cat file.txt
this awk command can find min from 2 column, but i have to change the column number, is there a one liner which can give me desired output in the same text file.
Thanks in advance.
Last edited by joeyg; 04-04-2012 at 04:29 PM..
Reason: corrected spelling, added CodeTags
Hi
I wanted to write a shell script with an if condition
Example
MinValue=10
MaxValue=30
logvalue = some integer value that script reads from the command line arguement
I wanted to check whether log value greater than or equal to10 and less than equal to 30
and proceed with the rest of... (5 Replies)
hello friends...:-)
i need some help
i have a file cantain like this
Star1 ,NetWork,09/02/2008
Star1 ,NetWork,10/02/2008
Star1 ,NetWork,11/02/2008
Star2 ,NetWork,08/03/2008
Star2 ,NetWork,09/04/2008
Star2 ,NetWork,10/05/2008
i need to find out min, max dates
the output look like... (6 Replies)
hi!
i have a file like the attachement.
I'd like to get for each line the min, max and average values. (there is 255 values for each line)
how can i get that ?
i try this, is it right?
BEGIN {FS = ","; OFS = ";";max=0;min=0;moy=0;total=0;freq=890}
$0 !~ /Trace1:/ {
... (1 Reply)
Hi all,
Ive searched the forum but with no luck...
I have a file:
ID Name Val
1 bob 45
2 joe 89
3 sue 11
4 steve 89
...
etc
I want to find a way to print... (6 Replies)
Hi ,
Below is my sample data,I have this 8 column(A,B,C,D,E,F,G,H) in csv file.
A , B ,C ,D ,E ,F,G ,H
4141,127337,24,15,20,69,72.0,-3
4141,128864,24,15,20,65,66.0,-1
4141,910053,24,15,4,4,5.0,-1
4141,910383,24,15,22,3,4.0,-1
4141,496969,24,15,14,6,-24.0,-18... (7 Replies)
I need to find the max/min of columns 1 and 2 of a 2 column file what contains the special character ">".
I know that this will find the max value of column 1.
awk 'BEGIN {max = 0} {if ($1>max) max=$1} END {print max}' input.file
But what if I needed to ignore special characters in the... (3 Replies)
Gents,
I have a big file file like this.
5100010002
5100010004
5100010006
5100010008
5100010010
5100010012
5102010002
5102010004
5102010006
5102010008
5102010010
5102010012
The file is sorted and I would like to find the min and max value, taking in the consideration key1... (3 Replies)
You have a log file as attached in sample input with various operations and time taken by each of them. Write a script to find the min and max time taken for each operation. Sample output is attached.
Sample Input is given as below:
operation1,83621
operation2,72321
operation3,13288... (1 Reply)
Discussion started by: Chandan_Bose
1 Replies
LEARN ABOUT SUNOS
mlib_vectorminimum_u8
mlib_VectorMinimum_U8(3MLIB) mediaLib Library Functions mlib_VectorMinimum_U8(3MLIB)NAME
mlib_VectorMinimum_U8, mlib_VectorMinimum_S8, mlib_VectorMinimum_S16, mlib_VectorMinimum_S32, mlib_VectorMinimum_F32, mlib_VectorMini-
mum_D64 - find the minimum value in a vector
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_VectorMinimum_U8(mlib_u8 *min, const mlib_u8 *x, mlib_s32 n);
mlib_status mlib_VectorMinimum_S8(mlib_s8 *min, const mlib_s8 *x, mlib_s32 n);
mlib_status mlib_VectorMinimum_S16(mlib_s16 *min, const mlib_s16 *x, mlib_s32 n);
mlib_status mlib_VectorMinimum_S32(mlib_s32 *min, const mlib_s32 *x, mlib_s32 n);
mlib_status mlib_VectorMinimum_F32(mlib_f32 *min, const mlib_f32 *x, mlib_s32 n);
mlib_status mlib_VectorMinimum_D64(mlib_d64 *min, const mlib_d64 *x, mlib_s32 n);
DESCRIPTION
Each of these functions finds the minimum value of all elements in a vector.
The following equation is used:
max[0] = MIN{ x[i] i = 0, 1, ..., (n - 1) }
PARAMETERS
Each of the functions takes the following arguments:
min Pointer to the minimum value.
x Pointer to the first element of the source vector.
n Number of elements in the source vector.
RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_VectorMaximum_U8(3MLIB), mlib_MatrixMaximum_U8(3MLIB), mlib_MatrixMinimum_U8(3MLIB), attributes(5)SunOS 5.10 10 Nov 2004 mlib_VectorMinimum_U8(3MLIB)