I have task to find out the min,max, average value of each service for example i searched for " StatementService "
Now there are three services which i need to get the min/max/avg values, so i used the below awk. But it's give me a false result.
I also used the
still the min valuse is wrong here.
NOTE: The pattern is not consistent in position and in lines, some line contains the StatementService where some lines not and also in the first line it is coming in the 4th position but rest of the lines it comes in the 3rd position.
Please help me to find out solution. Also if there is any other logic please let me know. I have 108 transaction which has around 10-15 services where i need to find out the min/max and avg.
---------- Post updated at 06:51 AM ---------- Previous update was at 04:18 AM ----------
I found a way to find that, but it look very odd to me and i consider its not a smarter way to do this, please comment on this and suggest better one.
Is there any way so that i can serach for only one time not three times?
Regards,
senthil.
---------- Post updated 08-21-09 at 01:21 AM ---------- Previous update was 08-20-09 at 06:51 AM ----------
I am trying to check my logic on a long awk i'm using. I have about 30 checks that I built into an awk and I "believe" I did this right, but I could be wrong.
awk -F\| '
$9 !~ /\/*{1,}*/
$9 ~ /\(-{4}, {2,3}/
$9 ~ /\({6}, {2,3}\)/
$9 ~ /\(\+{5}, {2,3}\)/
$9 ~ /\(\+\+{4}, {2,3}\)/
$9 ~... (8 Replies)
Hi,
I need the logic to utilize the command output to be feeded over to successive commands,
for example :
$ dtconf list-ls-data-sources -h hostname -P 636 -w ~/pwd.txt
DATA MASTER 1
DATA MASTER 2
DATA CONSUMER 1
DATA CONSUMER 1
DATA CONSUMER 1
Based on above output, i would like... (7 Replies)
Hi friends, I am having 2 files, I just want to compare 2 files each containing 2 columns 1st column is lat, and 2nd column is long, if anyone can understand below logic please help me in writing script with awk.. here each field of file2 needs to be compared with std_file
main
counter=0... (1 Reply)
Hi,
My file has 2 fields and millions of lines.
variableStep chrom=Uextra span=25
201 0.5952
226 0.330693
251 0.121004
276 0.0736858
301 0.0646982
326 0.0736858
401 0.2952
426 0.230693
451 0.221004
476 0.2736858
Each field either has a... (6 Replies)
In one data file i have values like this
a b c 1 2
e f g 2 3
i j k 3 5
I need to sum up the last 2 columns and make a data file...How i can do that.
a b c 1 2
e f g 2 3
i j k 3 5... (8 Replies)
I want to print lines that have "IND" or "ind" or nothing in field 2 or 3
file:
output needed:
Code i wrote:
nawk -F"," '{if(tolower($2||$3) ~"ind"||"")print}' file
Help is appreciated (3 Replies)
Hi Friends,
I got stuck where to start with ..
I ve a input file like below. where I want to compare write data with my read data .. The problem is that the read data should be compared with the lastest write data on that address.
Note- Both write data & read data are in the same... (8 Replies)
Hello Friends,
I have a txt file like below
//*Init Start
Reg(read,12'h42E,16'h0000);
Nop(5628.5);
//*Init End
//*Main Start
Reg(read,12'h42E,16'h0000);
Nop(5628.5);
//*Main End
I want to calculate the values between //* Init Start & //* Init End
And //*Main Start & //*Main... (5 Replies)
Hello friends,
I have a problem in printing an array..
Example if my array line contains 4 elements like following
line=0002 , line=202200, line=200002, line= 300313
Now one = sprintf line line line line will concatenate my whole array to one.
But I am not sure about the... (7 Replies)