Sponsored Content
Top Forums Shell Programming and Scripting Finding minimum value out of specific rows Post 302547519 by CAch on Tuesday 16th of August 2011 02:30:25 AM
Old 08-16-2011
Finding minimum value out of specific rows

Hi all,

I am having multiple files with the pattern given below:

Quote:
29 awh 1 hkl 5.789
29 awh 2 gyh 4.765
29 awh 3 bdf 9.654
29 awh 4 hfk 3.786
29 awh 5 lkj 8.543
.
.
30 awh 1 hkl 14.342
30 awh 2 gyh 23.543
30 awh 3 bdf 2.764
30 awh 4 hfk 4.123
30 awh 5 lkj 8.432
.
.
31 vbn 1 hkl 43.654
31 vbn 2 gyh 12.765
31 vbn 3 bdf 3.564
31 vbn 4 hfk 67.231
31 vbn 5 lkj 1.548
I need to find the minimum value of 5th column if column 1 is x and 2nd column is awh or vbn or ... (20 different strings).
the output must be like:

Quote:
29 awh 4 hfk 3.786
30 awh 3 bdf 2.764
31 vbn 5 lkj 1.548
and so on....
Kindly help me to figure out this prob....

Thanks in advance Smilie
 

10 More Discussions You Might Find Interesting

1. Solaris

finding & replacing blank rows/spaces in a file

Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks sample file:... (2 Replies)
Discussion started by: Gerry405
2 Replies

2. Shell Programming and Scripting

Finding different rows

I have two files. They are prety much the same, except a few lines. I would like to get the differences between the two file, but only those differences and nothing more. "diff" and "sdiff" cannot seem to do it. "sdiff -s" gets close, but I still get "less than" or "greater than" signs in the... (2 Replies)
Discussion started by: dombi
2 Replies

3. Shell Programming and Scripting

Finding Minimum value per Row range of data

Here is an example of a file I am working with: C 4704 CB 1318 ASP 115 BGRF 1 weak 0.0% 4.33 C 4720 OD 1322 ASP 115 BGRF 1 weak 0.0% 3.71 O 4723 OD 1322 ASP 115 BGRF 1 weak 0.0% 3.48 O 4723 CG 1321 ASP 115 BGRF 1 weak 0.0% 4.34... (3 Replies)
Discussion started by: userix
3 Replies

4. Shell Programming and Scripting

Deleting specific rows in large files having rows greater than 100000

Hi Guys, I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language the text file contains data in a pipe delimited format sdfsdfs sdfsdfsd START_ROW sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies

5. Shell Programming and Scripting

Finding minimum value

Hi All, I have multiple files which contains 5 columns and multiple rows..... I want to calculate the minimum value of column 5th, if column 2 is MET, till column 1 comes to the next number. Also it must skip the condition similar to 1st line where column number 1 and 3 are same and... (9 Replies)
Discussion started by: CAch
9 Replies

6. Shell Programming and Scripting

Extracting specific rows

Hi all..... I have a file which contains large data...like I want to print the rows starting from "pixel" till the file read the letter "TER" into a new output file.... can anyone plz help in doing this ?? (5 Replies)
Discussion started by: CAch
5 Replies

7. Shell Programming and Scripting

Finding Minimum in a Series

I have two LARGE files of data more than 20,000 line each, file-1 and file-2, and I wish to do the following if possible: file-1 1 2 5 7 9 2 4 6 3 8 9 4 6 8 9 3 2 1 3 1 2 . . . file-2 1 2 3 2 5 7 5 7 3 7 9 4 . (5 Replies)
Discussion started by: ali2011
5 Replies

8. Shell Programming and Scripting

Finding minimum maximum and average

I am trying to find the minimum maximum and average from one file which has values Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from... (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

9. UNIX for Dummies Questions & Answers

Finding difference in 1st field for rows of data

I have a file that has multiple lines, of grouped data, that typically all have the same values in the 1st field, however, I would like to search the 1st field for any differences and set a flag to use in an "if" statement to run some other routine. An example of the typical file is below,... (2 Replies)
Discussion started by: co21ss
2 Replies

10. Shell Programming and Scripting

Python: find the minimum in all rows

I am using Biopython to process an alignment in fasta format. I need to slice the sequences where there is the first stop codon. So I divided my alignment in codons and found the stop. I then found the first codon position using enumerate(). But I found the minimum for each row. However I need to... (0 Replies)
Discussion started by: Homa
0 Replies
BDFIMPLODE(1)						      General Commands Manual						     BDFIMPLODE(1)

NAME
bdfimplode - Convert a BDF font into GNU Unifont .hex format. SYNOPSIS
bdfimplode < input_font.bdf > output_font.hex DESCRIPTION
bdfimplode reads a BDF font from stdin and writes GNU Unifont .hex conversion of the font to stdout. FILES
*.bdf font files SEE ALSO
hex2bdf(1), hex2bdf-split(1), hexbraille(1), hex2sfd(1), hexdraw(1), hexmerge(1), johab2ucs2(1), unibmp2hex(1), unicoverage(1), unidup(1), unihex2bmp(1), unipagecount(1), uniunmask(1) AUTHOR
bdfimplode was written by Roman Czyborra. LICENSE
bdfimplode is Copyright (C) 1998 Roman Czyborra, and is released under the following terms (taken from http://czyborra.com): "All of my works you find here are freeware. You may freely copy, use, quote, modify or redistribute them as long as you properly attribute my contribution and have given a quick thought about whether Roman might perhaps be interested to read what you did with his stuff. Hori- zontal rules don't apply." BUGS
bdfimplode was written to read a BDF file created by the hex2bdf script. It will not properly handle other BDF files with differing bound- ing boxes. 2008 Jul 06 BDFIMPLODE(1)
All times are GMT -4. The time now is 10:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy