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 progressing.
Here is an example
The nam= value can vary.
I want to sum up the following
by
nam = '(this can vary)'
obj#=
So that would be the group by.
Then i want to sum up the number
blocks=
for each of the above. Note, that the number of blocks can be higher than 1. so its not just summing the number of rows and the nam= can be alot of different things.
but I only want to do this type of summation if there is a blocks=, some nam, so not have them and id want to handle that differently.
Last edited by Franklin52; 03-05-2012 at 03:10 AM..
Reason: fixed code tags
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Hi all,
Let's say I have a script calling for the two variables PA_VALUE and PB_VALUE.
for pa in PA_VALUE
blah blah
do
for pb in PB_VALUE
blah blah
do
I have a text file with two columns of values for PA and PB.
14.5 16.7
7.8 9.5
5.6 3.6
etc etc
I would like to read this... (7 Replies)
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)
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)
Hey,
I am gettin a bit crazy with my script. I have several input datas with the same name (5.ill) in different folders (daysim_01, daysim_02, etc.). The 4. column of each of the data has to be summed with each other and then hass to be written in one new file.
So file1:
1 1 0 1
2 1 1 2 ... (7 Replies)
I have this portion of a script and it works:
base_config="A B C D E"
for field in $base_config
do
var=`echo $field`
((i=$i+1))
done
I get an array of var=A, var=B, and so on.
What if I have this example with white space and want to put it into an array while... (1 Reply)
Hi Guys,
I have a text file with ";" like separator
F1;F2;F3;F4;F5
444;100041;IT;GLOB;1800000000
444;100041;TM;GLOB;1000000000
444;10300264;IT;GLOB;2000000000
444;10300264;IT;GLOB;2500000000
I have to sum the cullums F5 for same F2 and F3 collums
The result must be:
... (7 Replies)
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)
I have a file which contains data as below:
-----------------------------------------------------------------------------------------------
GSPWeb Statistics for the period of last 20 days... (3 Replies)