You could then just list all your directory and grep for 2012 pattern
(Tested on my ubuntu, even if i look for -name "*2012*", if won't get ./2012/02/ or ./2012/02/ subdirectories since the 2012 is part of the dirname, and not pat of the name itself (which is just 02)
Since we don't know at which level in the parent name the 2012 will come, the simple find command mentionned above should bring the intended result ... as far as i understand the requirements.
Ahhhrrrggg I'm having a brain fart...
I want to take the output of a command and redirect it to a file...
This works....
$ man cp | cat >> copy_help
but this doesn't
keytool -help |cat >> keytool_help
It just produces... these lines...
more keytool_help
] ...
... (11 Replies)
Hi all, I have a script which call a java program, the logging (to log file) in the program is done using log4j. However, as a safety measure, i still choose to direct standard error to another log file as follow
/usr/bin/java -classpath ${classpath} -Xmx128m TestingProgram 2>>... (1 Reply)
Hi,
I would like to list files: ls *.hdf
But I would like a copy of the output directed to the screen, but also APPENDED to a text file: test.txt
I have tried:
ls *.hdf | tee test.txt
However, that will just write over everything already existing in test.txt. How can I append the... (1 Reply)
Hi
i am compiling a source code by make command.
i want to redirect the output of make to a file but at the same time i want to see the output in terminal.
how to do this ?.
please suggest your idea.
thanks in advance.
Saravana
---------- Post updated at 05:24 PM ----------... (2 Replies)
Hi evreybody
In my program i work with file compressed with 7zip
I need to decompress these file
I've red the man page of p7zip which is very short (maybe too short)
Is there another program to work whit 7zip files
I need options like
redirect output (p7zip decompress file in the... (1 Reply)
Hi All,.
We are using AIX as the OS to host the Oracle ERP. We have a command FNDLOAD which is used to load setups. When this command is run, it outputs names of log files and any errors to the screen.
I am trying to redirect this output to a file because we have large number of these... (4 Replies)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
i make a shell script. There has a line wget
https://cisofy.com/files/lynis-2.1.0-88394c1affb9e23bd7390098947b3fd4b04e35e8.tar.gzWhen this line execute terminal show some text like this
Resolving cisofy.com (cisofy.com)... 149.*.*.*
Connecting to cisofy.com (cisofy.com)|149.*.*.*|:4444...... (4 Replies)
I'm trying to find out what happened to the rogue game that apt-get told me it installed, so I thought I would find the file. I went to the root and entered:
find -name "rog*.*"
I get a large number of lines saying my access is denied in various directories. I figure I'll practice my Unix... (14 Replies)
Discussion started by: arghvark
14 Replies
LEARN ABOUT DEBIAN
statistics::basic::variance
Statistics::Basic::Variance(3pm) User Contributed Perl Documentation Statistics::Basic::Variance(3pm)NAME
Statistics::Basic::Variance - find the variance of a list
SYNOPSIS
Invoke it this way:
my $variance = variance(1,2,3);
Or this way:
my $v1 = vector(1,2,3);
my $var = var($v1);
And then either query the values or print them like so:
print "The variance of $v1: $variance
";
my $vq = $var->query;
my $v0 = 0+$var;
Create a 20 point "moving" variance like so:
use Statistics::Basic qw(:all nofill);
my $sth = $dbh->prepare("select col1 from data where something");
my $len = 20;
my $var = var()->set_size($len);
$sth->execute or die $dbh->errstr;
$sth->bind_columns( my $val ) or die $dbh->errstr;
while( $sth->fetch ) {
$var->insert( $val );
if( defined( my $v = $var->query ) ) {
print "Variance: $v
";
}
# This would also work:
# print "Variance: $v
" if $var->query_filled;
}
METHODS
new()
The constructor takes a list of values, a single array ref, or a single Statistics::Basic::Vector as arguments. It returns a
Statistics::Basic::Variance object.
Note: normally you'd use the mean() constructor, rather than building these by hand using "new()".
query_mean()
Returns the Statistics::Basic::Mean object used in the variance computation.
_OVB::import()
This module also inherits all the overloads and methods from Statistics::Basic::_OneVectorBase.
AUTHOR
Paul Miller "<jettero@cpan.org>"
I am using this software in my own projects... If you find bugs, please please please let me know. :) Actually, let me know if you find it
handy at all. Half the fun of releasing this stuff is knowing that people use it.
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).
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::Variance(3pm)