07-06-2015
Hi Shilpi,
the output from your code is
Quote:
HMScore = 7.99 HMScore = 17.99 HMScore = 43.99 HMScore = 34.99
HSScore = 7.73 HSScore = 17.73 HSScore = 72.73 HSScore = 1.73
Pre avg = 2.90 Pre avg = 21.90 Pre avg = 25.90 Pre avg = 34.90
Pre bind ene =1.09 Pre bind ene =111.09 Pre bind ene =14.09 Pre bind ene =12.0
Name = abc Name = djhf Name = sgs Name = lksf
HPScore = 6.00 HPScore = 16.00 HPScore = 12.00 HPScore = 61.00
I am looking for something else.
But thanks, it might be useful for other problems.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to get the line count of the file from the 2nd line of the file ? The first line is header so want to skip that.
Thanks. (8 Replies)
Discussion started by: smc3
8 Replies
2. Shell Programming and Scripting
I want to sort lines by how many times a string occurs in each line (the most times first).
I know how to do this in two passes (add a count field in the first pass then sort on it in the second pass).
However, can it be done more optimally with a single AWK command? My AWK has improved... (11 Replies)
Discussion started by: Michael Stora
11 Replies
3. Shell Programming and Scripting
Hi,
i have file which contains data as below(Only sample shown, it may contain more data similar to the one shown here)
i need to read this file line by line and generate an output file like the one below
i.e based on N value the number of MSISDNs will vary, if N=1 then the following... (14 Replies)
Discussion started by: aemunathan
14 Replies
4. Shell Programming and Scripting
Hi ,
I am trying to write an shell, which reads a text file (from a location) having a list of numbers of strictly 5 digits only ex: 33144
Now my script will check :
1) that each entry is only 5 digits & numeric only, no alphabets, & its not empty.
2)then it executes a shell script called... (8 Replies)
Discussion started by: new_to_shell
8 Replies
5. Shell Programming and Scripting
Hi
As a newbe in scripting, i struggle hard with my first script.
What i want to do is, bringing data of two files together.
file1:
....
05/14/12-04:00:00 41253 4259 5135 5604 5812 5372
05/14/12-04:10:00 53408 5501 6592 7402 7354 6639
05/14/12-04:20:00 58748 6037 7292 8223... (13 Replies)
Discussion started by: IMPe
13 Replies
6. Shell Programming and Scripting
Hello fellow awkers and seders:
need to figure out a way to ensure a software deployment has completed by checking its trace file in which I can store the deployment results as follows:
echo $testvar
===== Summary - Deploy Result - Start ===== ===== Summary - Deploy Result - End =====... (1 Reply)
Discussion started by: ux4me
1 Replies
7. Shell Programming and Scripting
Hi,
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Discussion started by: ketanraut
2 Replies
8. Programming
Hi all,
If i would like to process a file input as below:
col1 col2 col3 ...col100
1 A C E A ...
3 D E G A
5 T T A A
6 D C A G
how can i perform a for loop to count the occurences of letters in each column? (just like uniq -c ) in every column.
on top of that, i would also like... (8 Replies)
Discussion started by: iling14
8 Replies
9. Shell Programming and Scripting
Hi All,
Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.
Wraper script am trying is to do with above metion 2 files.
utility tool accepts :
a. userinfo file : which contains username
b. item file : which... (2 Replies)
Discussion started by: Optimus81
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
I have following codecd /tmp/test/
for vfile in `ls -1`
do
for vlink in `ls -l /tmp/testfile/*|bin/grep "local/init\.d/$vfile$"|bin/awk -F"->" '{print($1)}'|bin/awk -F"/" '{print($NF)}'`
I know `ls -1` list only file, but I don't... (3 Replies)
Discussion started by: stew
3 Replies
LEARN ABOUT DEBIAN
statistics::basic::mean
Statistics::Basic::Mean(3pm) User Contributed Perl Documentation Statistics::Basic::Mean(3pm)
NAME
Statistics::Basic::Mean - find the mean of a list
SYNOPSIS
Invoke it this way:
my $avg = mean(1,2,3);
Or this way:
my $v1 = vector(1,2,3);
my $avg = avg($v1);
And then either query the values or print them like so:
print "The mean of $v1: $avg
";
my $mq = $avg->query;
my $m0 = 0+$avg;
Create a 20 point moving average like so:
use Statistics::Basic qw(:all nofill);
my $sth = $dbh->prepare("select col1 from data where something");
my $len = 20;
my $avg = mean()->set_size($len);
$sth->execute or die $dbh->errstr;
$sth->bind_columns( my $val ) or die $dbh->errstr;
while( $sth->fetch ) {
$avg->insert( $val );
if( defined( my $m = $avg->query ) ) {
print "Mean: $m
";
}
# This would also work:
# print "Mean: $avg
" if $avg->query_filled;
}
METHODS
new()
The constructor takes a single array ref or a single Statistics::Basic::Vector as arguments. It returns a Statistics::Basic::Mean
object.
Note: normally you'd use the mean() constructor, rather than building these by hand using "new()".
_OVB::import()
This module also inherits all the overloads and methods from Statistics::Basic::_OneVectorBase.
OVERLOADS
This object is overloaded. It tries to return an appropriate string for the calculation or the value of the computation in numeric
context.
In boolean context, this object is always true (even when empty).
AUTHOR
Paul Miller "<jettero@cpan.org>"
COPYRIGHT
Copyright 2012 Paul Miller -- Licensed under the LGPL
SEE ALSO
perl(1), Statistics::Basic, Statistics::Basic::_OneVectorBase, Statistics::Basic::Vector
perl v5.14.2 2012-01-23 Statistics::Basic::Mean(3pm)