11-06-2009
Work but...
Hi guys,
Many thanks for your answers & solution.
I have a little issue. If the source trace change as is
444;100041;IT;GLOB;1800000000;;;;;I
444;100041;TM;GLOB;1000000000;;;;;I
444;10300264;IT;GLOB;4500000000;;;;;I
the awk drop the chars after the number ";;;;;I"
What i have to change?
Thanks and regards
Gianluca
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which contains data as below:
-----------------------------------------------------------------------------------------------
GSPWeb Statistics for the period of last 20 days... (3 Replies)
Discussion started by: mohsin.quazi
3 Replies
2. Shell Programming and Scripting
Friends,
I have to run iostat -d on my AIX machine and print the sum of the output in tps column per iteration. can any one pls guide me how to do this using awk. here is the sample output
iostat -d 2 2 | awk '!/System/ && !/Disks/ && !/cd/ && !/^$/ {print $4}'
2.0
3.0
1.0
3.0... (1 Reply)
Discussion started by: achak01
1 Replies
3. Shell Programming and Scripting
Basically I have to process a text file which has been sorted this way:
John 12
John 13
John 10
John 900
Peter 20
Peter 30
Peter 32
The first column is a name, and the second an arbitrary value, both delimited by a space. How can I sum them up such that it would become:
John 935... (2 Replies)
Discussion started by: Dwee
2 Replies
4. Shell Programming and Scripting
I have results from some statistical analyses.
The format of the results are as given below:
I want to select lines that have a p-value (last column) less than 0.05 from all the results files (*.results) and cat to a new results file.
It would be very nice if a new column is added that tells... (2 Replies)
Discussion started by: genehunter
2 Replies
5. Shell Programming and Scripting
I need help reading and summing some values in a file that looks like the following. This is an Oracle trace file. Oracle has as utility to do this,but it doesn't work properly unless my sql statement is done. I want to read the file and sum up some values to let me know how the query/job is... (0 Replies)
Discussion started by: guessingo
0 Replies
6. Shell Programming and Scripting
I have an input file that looks like:
ID1 V1 ID2 V2 P1 P2 P3 P4 ..... n no. of columns
1 1 1 1 1.0000 1.0000 1.0000 1.0000
1 1 1 2 0.9999 0.8888 0.7777 0.6666
1 2 1 1 0.8888 0.7777 0.6666 0.5555
1 2 1 2 0.7777 0.6666 0.5555 0.4444
2 1 1 1 0.6666 0.5555 0.4444 0.3333
2 1 1 2 0.5555 0.4444... (4 Replies)
Discussion started by: sdp
4 Replies
7. Shell Programming and Scripting
data file contains
failed=24
error=23
error=163
failed=36
error=903
i need to get a total count of each value above. i'm looking for the most efficient method to do this as the datafile i provided is just a sample. the actual data can be several hundred thousands of lines.
so from... (3 Replies)
Discussion started by: SkySmart
3 Replies
8. Shell Programming and Scripting
I want to sum and average all other columns by first column
GR1 1 4 7
GR1 2 5 8
GR1 3 6 9
GR2 11 14 17
GR2 13 16 19
GR3 1 3 5
GR3 2 4 6
For a limited number of columns I can do... (2 Replies)
Discussion started by: jianp83
2 Replies
9. Shell Programming and Scripting
I have a large XML file that I want to parse, and only print one specific value if two values are met.
This is the code so far:
#!/usr/local/bin/python
import xml.etree.ElementTree as ET
tree = ET.parse('onedb-dhcp.xml')
root = tree.getroot()
# This successfully gets all... (1 Reply)
Discussion started by: brianjb
1 Replies
10. UNIX for Beginners Questions & Answers
I have two directories of files (new-config-files and old-config-files):
new-config-files/this-db/config.inc.php
new-config-files/that-db/config.inc.php
new-config-files/old-db/config.inc.php
new-config-files/new-db/config.inc.php
new-config-files/random-database/config.inc.php
etc.
... (4 Replies)
Discussion started by: spacegoose
4 Replies
LEARN ABOUT CENTOS
tap::parser::sourcehandler::handle
TAP::Parser::SourceHandler::Handle(3) User Contributed Perl Documentation TAP::Parser::SourceHandler::Handle(3)
NAME
TAP::Parser::SourceHandler::Handle - Stream TAP from an IO::Handle or a GLOB.
VERSION
Version 3.28
SYNOPSIS
use TAP::Parser::Source;
use TAP::Parser::SourceHandler::Executable;
my $source = TAP::Parser::Source->new->raw( *TAP_FILE );
$source->assemble_meta;
my $class = 'TAP::Parser::SourceHandler::Handle';
my $vote = $class->can_handle( $source );
my $iter = $class->make_iterator( $source );
DESCRIPTION
This is a raw TAP stored in an IO Handle TAP::Parser::SourceHandler class. It has 2 jobs:
1. Figure out if the TAP::Parser::Source it's given is an IO::Handle or GLOB containing raw TAP output ("can_handle").
2. Creates an iterator for IO::Handle's & globs ("make_iterator").
Unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly.
METHODS
Class Methods
"can_handle"
my $vote = $class->can_handle( $source );
Casts the following votes:
0.9 if $source is an IO::Handle
0.8 if $source is a glob
"make_iterator"
my $iterator = $class->make_iterator( $source );
Returns a new TAP::Parser::Iterator::Stream for the source.
"iterator_class"
The class of iterator to use, override if you're sub-classing. Defaults to TAP::Parser::Iterator::Stream.
SUBCLASSING
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::Iterator, TAP::Parser::Iterator::Stream, TAP::Parser::IteratorFactory, TAP::Parser::SourceHandler,
TAP::Parser::SourceHandler::Executable, TAP::Parser::SourceHandler::Perl, TAP::Parser::SourceHandler::File,
TAP::Parser::SourceHandler::RawTAP
perl v5.16.3 2013-05-02 TAP::Parser::SourceHandler::Handle(3)