Sponsored Content
Full Discussion: Can anyone explain this line
Top Forums UNIX for Dummies Questions & Answers Can anyone explain this line Post 302878535 by disedorgue on Friday 6th of December 2013 02:32:14 PM
Old 12-06-2013
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Please explain this command line ?

Please explain this command line ? wc<infile<newfile Thanx, Saneesh Joseph. (2 Replies)
Discussion started by: saneeshjose
2 Replies

2. Shell Programming and Scripting

can anyone explain this?

:start /@~/{ h s/\(.*\)@~.*$/\1/ s/@~$// s/@~/\ /g p g s/.*@~\(.*\)/\1/ } //{ N s/\n/ / b start } (2 Replies)
Discussion started by: djkane
2 Replies

3. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

4. Shell Programming and Scripting

Please can any one explain this ${0##/}

I did not understand what is ${0##/} PGM=${0##/} TMP=/tmp/${PGM}.$$ Please explain me. (2 Replies)
Discussion started by: gadege
2 Replies

5. Shell Programming and Scripting

please explain the below

could u please convert the below statement to shell script ---------- logdir=/smp/dyn/logfiles/cpm/pgm/pgIm $logdir = $logdir ."/pgIm${toDate}*"; ---- could u please explain the below clearly grep -i adding $logdir | grep -iv equation | awk '{print \$NF}' | sort -u | sed -e... (1 Reply)
Discussion started by: mail2sant
1 Replies

6. AIX

can anyone explain this?

this is the mksys b script.... can anyone explain .. what # and 1 in if condition this is the first line of the script... it is not from middle of the script.... if then echo "Not enough parameters, need a client name for mksysb" Usage="Usage: $0 <client name>" ... (2 Replies)
Discussion started by: honeym210
2 Replies

7. Homework & Coursework Questions

Could anyone help explain this?

1. The problem statement, all variables and given/known data: I have a retake assignment to complete for my computer networks and OS class. This isn't really my area, had I known last year I could have swapped it for a different module I would have done so. I'm determined to get through it... (6 Replies)
Discussion started by: Squall Moogle
6 Replies

8. Shell Programming and Scripting

Explain $# please

I'm trying to follow a script and I see it begins with this: if ; then if ; then print "blah $0 blah blah " exit fi fi What does $# mean? I found out that $1 refers to the shell environment and the last argument that was entered or passed in the previous command. I couldn't find $#... (2 Replies)
Discussion started by: MaindotC
2 Replies

9. Shell Programming and Scripting

anyone can explain this?

why the case 2 will happen ? , ' should stop the history substitution ,shouldn't it? case 1 # echo "123"|sed '/123/!d' 123 case 2 # echo "123 > 456 > 1 > "|sed '/123/!d' -bash: !d': event not found case 3 # echo "123 > 456 > 12 > "|sed '/123/'\!d 123 # bash --version (1 Reply)
Discussion started by: justlooks
1 Replies

10. UNIX for Dummies Questions & Answers

How I can explain this?

Hi friends! I'm learning UNIX and I have a small question. Working with Shell, i put the name of one executable (in c language) + one number and it says this: $ gcc misterioso_4.c $ ./misterioso_4 6 got: , I can not find an answer in the manual because I havent applied any variable.... (5 Replies)
Discussion started by: dakota
5 Replies
Statistics::OnLine(3pm) 				User Contributed Perl Documentation				   Statistics::OnLine(3pm)

NAME
Statistics::OnLine - Pure Perl implementation of the on-line algorithm to produce statistics SYNOPSIS
use Statistics::OnLine; my $s = Statistics::OnLine->new; my @data = (1, 2, 3, 4, 5); $s->add_data( @data ); $s->add_data( 6, 7 ); $s->add_data( 8 ); print "count = ",$s->count," mean = ",$s->mean," variance = ",$s->variance," variance_n = ", $s->variance_n," skewness = ",$s->skewness," kurtosis = ",$s->kurtosis," "; $s->add_data( ); # does nothing! print "count = ",$s->count," mean = ",$s->mean," variance = ",$s->variance," variance_n = ", $s->variance_n," skewness = ",$s->skewness," kurtosis = ",$s->kurtosis," "; $s->add_data( 9, 10 ); print "count = ",$s->count," mean = ",$s->mean," variance = ",$s->variance," variance_n = ", $s->variance_n," skewness = ",$s->skewness," kurtosis = ",$s->kurtosis," "; DESCRIPTION
This module implements a tool to perform statistic operations on large datasets which, typically, could not fit the memory of the machine, e.g. a stream of data from the network. Once instantiated, an object of the class provide an "add_data" method to add data to the dataset. When the computation of some statistics is required, at some point of the stream, the appropriate method can be called. After the execution of the statistics it is possible to continue to add new data. In turn, the object will continue to update the existing data to provide new statistics. METHODS
new() Creates a new "Statistics::OnLine" object and returns it. add_data(@) Adds new data to the object and updates the internal state of the statistics. The method return the object itself in order to use it in chaining: my $v = $s->add_data( 1, 2, 3, 4 )->variance; clean() Cleans the internal state of the object and resets all the internal statistics. Return the object itself in order to use it in chaining: my $v = $s->clean->add_data( 1, 2, 3, 4 )->variance; count() Returns the actual number or elements inserted and processed by the object. mean() Returns the average of the elements inserted into the system: fract{ sum_1^n{x_i} }{ n } variance() Returns the variance of the element inserted into the system: fract{ sum_1^n{avg - x_i} }{ n - 1 } variance_n() Returns the variance of the element inserted into the system: fract{ sum_1^n{avg - x_i} }{ n } skewness() Returns the skewness (third standardized moment) of the element inserted into the system <http://en.wikipedia.org/wiki/Skewness> kurtosis() Returns the kurtosis (fourth standardized moment) of the element inserted into the system <http://en.wikipedia.org/wiki/Kurtosis> ERROR MESSAGES
The conditions in which the system can return errors, using a "die" are: too few elements to compute function Some functions need a minimum number of elements to be computed: "mean", "variance_n" and "skewness" need at least one element, "variance" at least two and "kurtosis" needs at least four. variance is zero: cannot compute kurtosis|skewness Both kurtosis and skewness need that variance to be greater than zero. THEORY
On-line statistics are based on strong mathematical foundations which transform the standard computations into a sequence of operations that incrementally update with new values the actual ones. There are some referencence in the web. This documentation suggest to start your investigation from <http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Higher-order_statistics>. The linked page provides other useful references on the foundations of the method. CAVEAT
The module is intended to be used in all the situations in which:(1) the number of data elements could be too large with respect the memory of the system, or(2) the elements arrive at different time stamps and intermediate results are needed. If the length of the stream is fixed, all the data elements are present in a single place and there is not need for intermediate results, it could be better to use different modules, for instance Statistics::Lite, to make computations. The reason for this choice is that the module uses a stable approximation, well suited for the use on steams (effectively an on-line algorithm). Using this system on fixed datasets could introduce some (little) approximation. HISTORY
0.02 Corrected typos in documentation 0.01 Initial version of the module AUTHOR
Francesco Nidito COPYRIGHT
Copyright 2009 Francesco Nidito. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Statistics::Lite, <http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Higher-order_statistics> perl v5.10.1 2009-09-04 Statistics::OnLine(3pm)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy