Hello folks,
I have data collected in every 3 hours. But, I would like to expand this to 1 hour interval by equally dividing with next row.
For example, I want to keep the first value 1987-01-01-00z 2.0, but following all record should be re-written as follow.
1987-01-01-03z 5.0 becomes... (11 Replies)
Hi All,
I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers.
I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err
Regards,... (0 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
Hello friends!
Help me pls to write correct awk and grep statements for my task:
I have got files with name filename.txt
It has such structure:
Start of file
FROM: address@domen.com (12...890) abc
DATE: 11/23/2009 on Std
SUBJECT: any subject
End of file
So, I must check,
if this file... (4 Replies)
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
I am on Ubuntu 11.10 using bash.
I want to perform some numeric computations and have the following options:
# Setting verbosity levels
none=0; low=1; medium=2; high=3; debug=4
(( vbLevel=medium ))
if (( vbLevel > low )); then
echo "Test 1, $vbLevel"
fi
vbLevel=$medium
if ];... (3 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
I have the following code and into into trying to simplifying it. Any suggestions please?
pmin = min (p(1), p(2), p(3), p(4), p(5), p(6))
ni = 0
xint = 0.0
yint = 0.0
zint = 0.0
!--------------------------------------------- !
if ((0.99999 * p(1)) <= pmin) then
... (3 Replies)
I hope this makes sense and is possible.
I am trying to match $1 of panel_genes.txt with $3 of RefSeqGene.txt and when a match is found the value in $6 of RefSeqGene.txt
Example: ACTA2 is $1 of panel_genes.txt
ACTA2 NM_001613.2
ACTA2 NM_001141945.1
awk 'FNR==NR {... (4 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT DEBIAN
autobox::list::util
autobox::List::Util(3pm) User Contributed Perl Documentation autobox::List::Util(3pm)NAME
autobox::List::Util - bring the List::Util functions to autobox
VERSION
Version 20090629
SYNOPSIS
"autobox::List::Util" brings all of the functions from List::Util to arrays as methods.
use autobox::List::Util;
my @array = qw/ foo bar baz /;
print @array->first(sub { /ar/ }), "
"; # "bar"
print [5, 6, 3, 4]->max, "
"; # 6
print @array->maxstr, "
"; # baz
print [5, 6, 3, 4]->min, "
"; # 3
print @array->minstr, "
"; # foo
print [1 .. 10]->shuffle, "
"; #1 to 10 randomly shuffled
print [1 .. 10]->sum, "
"; # 55
print [1 .. 10]->reduce( sub { $a + $b } ), "
"; # 55
METHODS
first(coderef)
This method behaves nearly the same as the first function from List::Util, but it takes a coderef not a block because methods can't use
prototypes.
reduce(coderef)
This method behaves nearly the same as the reduce function from List::Util, but it takes a coderef not a block for the same reason. It
also has a bug (see BUGS)
shuffle
If called in scalar context it returns a reference to an array instead of a list. This allows shuffle to be chained with other calls.
max, maxstr, min, minstr, sum
These methods behave exactly the same as their List::Util counterparts.
AUTHOR
Chas. J. Owens IV, "<chas.owens at gmail.com>"
BUGS
The reduce method works with $main::a and $main::b, not your current package's $a and $b, so you need to say
print @array->reduce( sub { $main::a + $main::b } ), "
";
if you are not in the main package. Reduce uses $_, so it doesn't suffer from this problem.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc autobox::List::Util
You can also look for information at:
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=autobox-List-Util>
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/autobox-List-Util>
o CPAN Ratings
<http://cpanratings.perl.org/d/autobox-List-Util>
o Search CPAN
<http://search.cpan.org/dist/autobox-List-Util/>
ACKNOWLEDGEMENTS COPYRIGHT & LICENSE
Copyright 2009 Chas. J. Owens IV, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-04-17 autobox::List::Util(3pm)