I want to find average of column values like if the value in column 2 is between 0-250000 the average of column 1 is some xx and average of column2 is ww then if value is 250001-5000000 average of column 1 is yy and average of column 2 is zz.
And my interval to find the average is 250000
Can anyone help me on this.
Thanks.
Last edited by bhargavpbk88; 03-23-2012 at 05:08 PM..
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Hi,
I'm new to shell programming, can anyone help me on this? I want to do following operations -
1. Average salary for each country
2. Total salary for each city
and data that looks like -
salary country city
10000 zzz BN
25000 zzz BN
30000 zzz BN
10000 yyy ZN
15000 yyy ZN
... (3 Replies)
Hi,
I would like to calculate the average of column 'y' based on the value of column 'pos'.
For example, here is file1
id pos y c
11 1 220 aa
11 4333 207 f
11 5333 112 ee
11 11116 305 e
11 11117 310 r
11 22228 781 gg
11 ... (2 Replies)
I have a list of columns with values that I need to transform into a row containing the range of each column. For example:
"Column A"
1
2
3
4
10
12
14
15
16
17
18
"Column B"
1
4
5
6 (4 Replies)
Hello, I have a file with nearly 57K lines. I want to filter the lines based on the range of values in a column. For e.g. print lines whose 3rd filed is >=0.02.
Input file:
LOC_Os09g32030 LOC_Os02g18880 0.0200037219149773 undirected NA NA
LOC_Os03g58630 LOC_Os09g35690 ... (1 Reply)
Dear Experts,
Kindly help me please,
I have a big file where there is duplicate values in col 11 till col 23, every 2 rows appers a new numbers, but in each row there is different coordinates x and y in col 57 till col 74.
Please i will like to get a single value and average of the x and y... (8 Replies)
Hi,
My input file
Gene1 1
Gene1 2
Gene1 3
Gene1 0
Gene2 0
Gene2 0
Gene2 4
Gene2 8
Gene3 9
Gene3 9
Gene4 0
Condition:
If the first column matches, then look in the second column. If there is a value of zero in the second column, then don't consider that record while averaging.
... (5 Replies)
Im looking for a way to average the values in field 14 (when field 2 is equal to 2016) and fields 3 and 4 (when field 2 is equal to 2017).
Any help is appreciated.
001001 2016 33.22 38.19 48.07 51.75 59.77 67.68 70.86 72.21 66.92 53.67 42.31 40.15
001001 2017 ... (10 Replies)
Discussion started by: ncwxpanther
10 Replies
LEARN ABOUT REDHAT
logfile
LOGFILE(1) mrtg LOGFILE(1)NAME
logfile - description of the mrtg-2 logfile format
SYNOPSIS
This document provides a description of the contents of the mrtg-2 logfile.
OVERVIEW
The logfile consists of two main sections. A very short one at the beginning:
The first Line
It stores the traffic counters from the most recent run of mrtg
The rest of the File
Stores past traffic rate averates and maxima at increassing intervals
The first number on each line is a unix time stamp. It represents the number of seconds since 1970.
DETAILS
The first Line
The first line has 3 numbers which are:
A (1st column)
A timestamp of when MRTG last ran for this interface. The timestamp is the number of non-skip seconds passed since the standard UNIX
"epoch" of midnight on 1st of January 1970 GMT.
B (2nd column)
The "incoming bytes counter" value.
C (3rd column)
The "outgoing bytes counter" value.
The rest of the File
The second and remaining lines of the file 5 numbers which are:
A (1st column)
The Unix timestamp for the point in time the data on this line is relevant. Note that the interval between timestamps increases as you
prograss through the file. At first it is 5 minutes and at the end it is one day between two lines.
This timestamp may be converted in EXCEL by using the following formula:
=(x+y)/86400+DATE(1970,1,1)
you can also ask perl to help by typing
perl -e 'print scalar localtime(x),"
"'
x is the unix timestamp and y is the offset in seconds from UTC. (Perl knows y).
B (2nd column)
The average incoming transfer rate in bytes per second. This is valid for the time between the A value of the current line and the A
value of the previous line.
C (3rd column)
The average outgoing transfer rate in bytes per second since the previous measurement.
D (4th column)
The maximum incoming transfer rate in bytes per second for the current interval. This is calculated from all the updates which have
occured in the current interval. If the current interval is 1 hour, and updates have occured every 5 minutes, it will be the biggest 5
minute transferrate seen during the hour.
E (5th column)
The maximum outgoing transfer rate in bytes per second for the current interval.
AUTHOR
Butch Kemper <kemper@bihs.net> and Tobias Oetiker <oetiker@ee.ethz.ch>
3rd Berkeley Distribution 2.9.17 LOGFILE(1)