Well, you're on the right track, just need to get your ducks in a row. Look at this an adapt to your needs:
Some further reading on awk might be really helpful.
hi, i have an awk script and I managed to figure out how to search the max value but Im having difficulty in searching for the min field value.
BEGIN {FS=","; max=0}
NF == 7 {if (max < $6) max = $6;}
END { print man, min}
where $6 is the column of a field separated by a comma (3 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)
I am redirecting my ping output to a file. The sample output is like this:
64 bytes from xx.xx.xx.167: icmp_seq=4490 ttl=116 3.75 ms 2011Jul12- 15 40 16
64 bytes from xx.xx.xx.167: icmp_seq=4491 ttl=116 5.29 ms 2011Jul12- 15 40 17
64 bytes from xx.xx.xx.167: icmp_seq=4492 ttl=116 4.88 ms... (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)
Hi all,
I have a list of numbers. I need an awk command to find out the numbers of elements (number of numbers, sort to speak), the average value the min and max value. Reading the list only once, with awk.
Any ideas?
Thanks! (5 Replies)
aaa: 3 ms
aaa: 2 ms
aaa: 5 ms
aaa: 10 ms
..........
to get the 3 2 5 10 ...'s min avg and max
something like
min: 2 ms avg: 5 ms max: 10 ms (2 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)
Hi,
I need your kind help to get min and max values from file based on value in $5 .
File1
SP12.3 stc 2240806 2240808 + ID1_N003 ID2_N003T0
SP12.3 sto 2241682 2241684 + ID1_N003 ID2_N003T0
SP12.3 XE 2239943 2240011 + ID1_N003 ID2_N003T0
SP12.3 XE 2240077 2241254 + ID1_N003 ... (12 Replies)
MPSNNReduceUnary(3) MetalPerformanceShaders.framework MPSNNReduceUnary(3)NAME
MPSNNReduceUnary
SYNOPSIS
#import <MPSNNReduce.h>
Inherits MPSCNNKernel.
Inherited by MPSNNReduceColumnMax, MPSNNReduceColumnMean, MPSNNReduceColumnMin, MPSNNReduceColumnSum, MPSNNReduceFeatureChannelsMax,
MPSNNReduceFeatureChannelsMean, MPSNNReduceFeatureChannelsMin, MPSNNReduceFeatureChannelsSum, MPSNNReduceRowMax, MPSNNReduceRowMean,
MPSNNReduceRowMin, and MPSNNReduceRowSum.
Instance Methods
(nonnull instancetype) - initWithDevice:
Properties
MTLRegion clipRectSource
Additional Inherited Members
Detailed Description
The MPSNNReduce performs a reduction operation The reduction operations supported are:
o Reduce row min
o Reduce column min
o Reduce feature channels min
o Reduce row max
o Reduce column max
o Reduce feature channels max
o Reduce row mean
o Reduce column mean
o Reduce feature channels mean
o Reduce row sum
o Reduce column sum
o Reduce feature channels sum
Method Documentation
- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device
Standard init with default properties per filter type
Parameters:
device The device that the filter will be used on. May not be NULL.
Returns:
A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be
MTLFeatureSet_iOS_GPUFamily2_v1 or later.
Reimplemented from MPSCNNKernel.
Reimplemented in MPSNNReduceFeatureChannelsSum, MPSNNReduceRowMin, MPSNNReduceColumnMin, MPSNNReduceFeatureChannelsMin, MPSNNReduceRowMax,
MPSNNReduceColumnMax, MPSNNReduceFeatureChannelsMax, MPSNNReduceRowMean, MPSNNReduceColumnMean, MPSNNReduceFeatureChannelsMean,
MPSNNReduceRowSum, and MPSNNReduceColumnSum.
Property Documentation
- clipRectSource [read], [write], [nonatomic], [assign]
The source rectangle to use when reading data. A MTLRegion that indicates which part of the source to read. If the clipRectSource does not
lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces
the MPSCNNKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture.
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSNNReduceUnary(3)