05-18-2009
Summation of the column value in an interval.
Hey,
I have a file with following data..
and I want to get the summation of 10th column. And this happens in every 10 seconds for a minute max.
242001 A mqsitst 794864 1249516 0 60 20 293050400 77016 * 02:05:33 - 0:04 DataFlowEngine EAITIBR2_BROKER 384403e1-1001-0000-0080-cc759314a02e IDS_CCASS 0
242001 A mqsitst 978998 1249516 0 60 20 24284a400 56092 * 02:05:33 - 0:03 DataFlowEngine EAITIBR2_BROKER 9fa202e1-1001-0000-0080-cc759314a02e 21CD1 0
242001 A mqsitst 1040482 1134684 0 60 20 13d86400 78684 * 02:05:35 - 0:04 DataFlowEngine EAIDQBR2_BROKER 6f8aa7d6-1001-0000-0080-be57c7f1134d WAMS1 0
The BOLD faced has to be added and its in the 10th column.
What should i do to make it easily done ?
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Please help to share your thought about how to perfrom summation for particular delimited field, and output to the particular file based on
-rw-r--r-- 1 abc other 3094 Oct 19 09:40 0132019832-ps5_online_cdrm.unl
-rw-r--r-- 1 abc other 1588 Oct 19 09:47... (2 Replies)
Discussion started by: rauphelhunter
2 Replies
2. Shell Programming and Scripting
Help plz
Does any one have any idea how to compare interval ranges of 2 files.
finding 1-4 (1,2,3,4) of input2 in input1 of same key "a" values (5-10, 30-40, 45-60, 80-90, 100-120 ). Obviously 1-4 is not one of the range with in input1 a. so it should give out of range.
finding 30-33(31,32,33)... (1 Reply)
Discussion started by: repinementer
1 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I need to sum values in a row.
eg:
input is: sum,value1,value2,value3,.....,value N
Required Output: sum,<summation of N values>
Please help me... (1 Reply)
Discussion started by: MrGopal666
1 Replies
4. Shell Programming and Scripting
Hello everyone,
my data is in a format as below
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a (8 Replies)
Discussion started by: jojo123
8 Replies
5. Shell Programming and Scripting
Hello Guys
Please find my below requirement
I have a flat file with column headers in first line and data
The structure like below
col1 col2 col3
A 1 2
B 3 4
C 5 6
Say I have to take the summation of col2 (that will depend on the... (2 Replies)
Discussion started by: Pratik4891
2 Replies
6. Shell Programming and Scripting
Hello Guru s
I need your kind help to solve my below issue
I have a directory of flat files and have to calculate sum of some columns from the flat file .
Say for flat file 302 I need the column summation of 2 and 3 rd column
For flat file 303 I need the column summation of 5 and... (2 Replies)
Discussion started by: Pratik4891
2 Replies
7. Shell Programming and Scripting
Hi
I am executing below command to do summation on 46th coloumn.
cat File1| awk -F"|" '{p += $46} END { printf"Column Name | SUM | " p}'
I am getting output as
Column Name | SUM | 1.01139e+10
Here I want output in Proper decimal format. Can someone tell me what change is required for same? (1 Reply)
Discussion started by: sanranad
1 Replies
8. Shell Programming and Scripting
hi guys,
i have a script that basically just sums up the values of 2 particular columns in a file, grouped by the columns specified as well
The script is quite long, but it's basically just repetitive.. just for each condition.
This script only accepts one type of input file.
... (22 Replies)
Discussion started by: ramneim
22 Replies
9. Shell Programming and Scripting
I have three folders named f1, f2 and f3. The file names are same in all these folders. I would like to get the summation of the second column from all files. How can I do this ?
file1 in f1 folder
143 143.69 60.2 81.30 40.4 62.39 166.3 83.38 107.2 60.30 37.5
144 192.62 107.9... (3 Replies)
Discussion started by: edisonjoe
3 Replies
10. UNIX for Beginners Questions & Answers
Hi All ,
I am having an input file as stated below
Input file
6 ddk/djhdj/djhdj/Q 10 0.5
dhd/jdjd.djd.nd/QB 01 0.5
hdhd/jd/jd/jdj/Q 10 0.5
512 hd/hdh/gdh/Q 01 0.5
jdjd/jd/ud/j/QB 10 0.5
HD/jsj/djd/Q 01 0.5
71 hdh/jjd/dj/jd/Q 10 0.5
... (5 Replies)
Discussion started by: kshitij
5 Replies
LEARN ABOUT DEBIAN
alzabo::column
Alzabo::Column(3pm) User Contributed Perl Documentation Alzabo::Column(3pm)
NAME
Alzabo::Column - Column objects
SYNOPSIS
use Alzabo::Column;
foreach my $c ($table->columns)
{
print $c->name;
}
DESCRIPTION
This object represents a column. It holds data specific to a column.
METHODS
table
Returns the table object to which this column belongs.
name
Returns the column's name as a string.
nullable
Returns a boolean value indicating whether or not NULLs are allowed in this column.
attributes
A column's attributes are strings describing the column (for example, valid attributes in MySQL are 'UNSIGNED' or 'ZEROFILL'.
This method returns a list of strings of such strings.
has_attribute
This method can be used to test whether or not a column has a particular attribute. By default, the check is case-insensitive.
It takes the following parameters:
* attribute => $attribute
* case_sensitive => 0 or 1 (defaults to 0)
It returns a boolean value indicating whether or not the column has this particular attribute.
type
Returns the column's type as a string.
sequenced
The meaning of a sequenced column varies from one RDBMS to another. In those with sequences, it means that a sequence is created and that
values for this column will be drawn from it for inserts into this table. In databases without sequences, the nearest analog for a
sequence is used (in MySQL the column is given the AUTO_INCREMENT attribute, in Sybase the identity attribute).
In general, this only has meaning for the primary key column of a table with a single column primary key. Setting the column as sequenced
means its value never has to be provided to when calling "Alzabo::Runtime::Table->insert".
Returns a boolean value indicating whether or not this column is sequenced.
default
Returns the default value of the column as a string, or undef if there is no default.
default_is_raw
Returns true if the default is intended to be provided to the DBMS as-is, without quoting, fore example "NOW()" or "current_timestamp".
length
Returns the length attribute of the column, or undef if there is none.
precision
Returns the precision attribute of the column, or undef if there is none.
is_primary_key
Returns a boolean value indicating whether or not this column is part of its table's primary key.
is_numeric
Returns a boolean value indicating whether the column is a numeric type column.
is_integer
Returns a boolean value indicating whether the column is a numeric type column.
is_floating_point
Returns a boolean value indicating whether the column is a numeric type column.
is_character
Returns a boolean value indicating whether the column is a character type column.
This is true only for any columns which are defined to hold text data, regardless of size.
is_date
Returns a boolean value indicating whether the column is a date type column.
is_datetime
Returns a boolean value indicating whether the column is a datetime type column.
is_time
Returns a boolean value indicating whether the column is a time type column.
is_time_interval
Returns a boolean value indicating whether the column is a time interval type column.
is_blob
Returns a boolean value indicating whether the column is a blob column.
This is true for any columns defined to hold binary data, regardless of size.
generic_type
This methods returns one of the following strings:
integer
floating_point
character
date
datetime
time
blob
unknown
definition
The definition object is very rarely of interest. Use the "type()" method if you are only interested in the column's type.
This methods returns the "Alzabo::ColumnDefinition" object which holds this column's type information.
comment
Returns the comment associated with the column object, if any.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.8.8 2007-12-23 Alzabo::Column(3pm)