hi all...
i have a big problem, and i hope someone can help me...
i have a flat file, and its columns are separated by comma (CSV), something like this:
78 , 204R180 , 90/100 , 200001 , 12 ,200002 ,13 .....
78 , 204R180 , 90/100 , 200001 , 29 ,200002 ,30 .....
78 , 204R180 , 90/100 ,... (0 Replies)
Hi All,
I have a file like
john::208:johnson
john::208:mery
john::208:test
admin:*:1:johnson
admin:*:1:test
and wanna convert this as
john::208:johnson,mery,test
admin:*:1:johnson,test
please help me to create a script for this
thanks in advance
John (4 Replies)
Hello!
I have a textfile that look like this:
"83d1:46:2b";"20091008190000";"Rögle BK - Skellefteå";"Swedish"
"d4c:46:21";"20091008190000";"Södertälje - Brynäs";"Swedish"
"d4b:46:2";"20091008190000";"HV 71 - Färjestad";"Swedish"
"838:46:b";"20091010160000";"Skellefteå - HV 71";"Swedish"... (2 Replies)
I have a file which has following contents
usmtnz-dinfsi19
62
61
18400
18800
99.7
usmtnz-dinfsi19
62
61
18400
18800
99.7
i want the o/p to be like
date (7 Replies)
Hi,
We have csv file where date is coming in MM/DD/YYYY HH:MM:SS (06/23/2015 20:59:12) in multiple places
But we need to change the date format to DD/Mon/YYYY HH:MM:SS (23/Jul/2015 20:59:12) using shell script.
Please let us know how can we achieve the same. (16 Replies)
Hi---Is there's way can write small shell script or perl script open "abc.txt" file and create new "new_abc.txt" file with format output below? Thanks
cat abc.txt
###########################Readme###############################
Contained with this README.TXT file are all of the
file... (7 Replies)
Hi all,
I have a file as below,
i would like the change the format of the time from "11/7/2019 20:12" to "2019-07-11 20:12:00" in the last coloumn.
any awk solution on this.
Input:
2,0,695016,1961612,497212,5800804,0,0,161,33,7605,12226,23,10,66,0,0,34,11/7/2019 20:10... (4 Replies)
Discussion started by: Raghuram717
4 Replies
LEARN ABOUT DEBIAN
statistics::basic::mode
Statistics::Basic::Mode(3pm) User Contributed Perl Documentation Statistics::Basic::Mode(3pm)NAME
Statistics::Basic::Mode - find the mode of a list
SYNOPSIS
Invoke it this way:
my $mode = mode(1,2,3,3);
Or this way:
my $v1 = vector(1,2,3,3);
my $mod = mode($v1);
And then either query the values or print them like so:
print "The mod of $v1: $mod
";
my $mq = $mod->query;
my $m0 = 0+$mod; # this will croak occasionally, see below
The mode of an array is not necessarily a scalar. The mode of this vector is a vector:
my $mod = mode(1,2,3);
my $v2 = $mod->query;
print "hrm, there's three elements in this mode: $mod
"
if $mod->is_multimodal;
Create a 20 point "moving" mode like so:
use Statistics::Basic qw(:all nofill);
my $sth = $dbh->prepare("select col1 from data where something");
my $len = 20;
my $mod = mode()->set_size($len);
$sth->execute or die $dbh->errstr;
$sth->bind_columns( my $val ) or die $dbh->errstr;
while( $sth->fetch ) {
$mod->insert( $val );
if( defined( my $m = $mod->query ) ) {
print "Mode: $m
";
}
print "Mode: $mod
" if $mod->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::Mode object.
Note: normally you'd use the mean() constructor, rather than building these by hand using "new()".
is_multimodal()
Statistics::Basic::Mode objects sometimes return Statistics::Basic::Vector objects instead of numbers. When "is_multimodal()" is true,
the mode is a vector, not a scalar.
_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).
If evaluated as a string, Statistics::Basic::Mode will try to format a number (like any other Statistics::Basic object), but if the object
"is_multimodal()", it will instead return a Statistics::Basic::Vector for stringification.
$x = mode(1,2,3);
$y = mode(1,2,2);
print "$x, $y
"; # prints: [1, 2, 3], 2
If evaluated as a number, a Statistics::Basic::Mode will raise an error when the object "is_multimodal()".
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::Mode(3pm)