Hi,
I have below awk statement and I need to convert the second field ( substr($0,8,6))from minutes to hours with 2 decimail place. How can I achieve this?
/usr/bin/awk '{print substr($0,23,4),substr($0,8,6)}' /tmp/MANAGER_LIST.$$ >> /tmp/NEWMANAGER_LIST.$$
Thanks for any help! (4 Replies)
hi!
i have a file like the attachement.
you can see on the last column, there is a marker from 1 to 64 for each time.
I'd like to have the median for each marker: i want to get a median every 128 values
the result is : for an hour and marker x, i have the median value
thank you for... (5 Replies)
Hi All,
I have some data like below.
Step1,Param1,Param2,Param3
1,2,3,4
2,3,4,5
2,4,5,6
3,0,1,2
3,0,0,0
3,2,1,3
........
so on
Where I need to find the median(arithmetic) of each column from Param1...to..Param3 for each set of Step1 values.
(Sort each specific column, if the... (5 Replies)
I use the following script to print the sum and how could I extend this to print medians instead? thanks
name s1 s2 s3 s4
g1 2 8 6 5
g1 5 7 9 9
g1 6 7 8 9
g2 8 8 8 8
g2 7 7 7 7
g2 10 10 10 10
g3 3 12 1 24
g3 5 5 24 48
g3 12 3 12 12
g3 2 3 3 3
output
name s1 s2 s3 s4
g1 5 7 8 9... (5 Replies)
Discussion started by: quincyjones
5 Replies
LEARN ABOUT DEBIAN
numaverage
NUMAVERAGE(1) User Contributed Perl Documentation NUMAVERAGE(1)NAME
numaverage - Find the average of a set of numbers.
SYNOPSIS
numaverage [-dhiIlmMV] <FILE>
| numaverage [-dhiIlmMV] (Input on STDIN from pipeline.)
numaverage [-dhiIlmMV] (Input on STDIN. Use Ctrl-D to stop.)
DESCRIPTION
By default numaverage will determine the average from all numbers on input. Other options allow you to find the mode and median.
OPTIONS -i Only return the integer portion of the final sum.
-I Only return the decimal portion of the final sum
-m Find the mode (most occuring) of the list of numbers,
or when there's more than one mode, the first completed mode.
-M Find the median (middle number) of the list of numbers.
-l When finding the median and the count of numbers in the set is even,
use the lower middle number instead of the upper middle number.
-h Help: You're looking at it.
-V Increase verbosity.
-d Debug mode. For developers
SEE ALSO numbound(1), numinterval(1), numnormalize(1), numgrep(1), numprocess(1), numsum(1), numrandom(1), numrange(1), numround(1)COPYRIGHT
numaverage is part of the num-utils package, which is copyrighted by Suso Banderas and released under the GPL license. Please read the
COPYING and LICENSE files that came with the num-utils package
Developers can read the GOALS file and contact me about providing
submitions or help for the project.
MORE INFO
More info on numaverage can be found at:
http://suso.suso.org/programs/num-utils/
perl v5.10.1 2009-10-31 NUMAVERAGE(1)