5

get max value every 4 rows between 2 column

view full story
linux-howto

http://www.unix.com – Hi all I have a file that has two columns and I need the maximum value in column 2 of 4 positions o rows. for example at position {1..3} there are 4 characters (A, C, G and T) each of these characters with a value with a value in column 2. I need the maximum value in column 2 and the corresponding value in column 1. for example this is the file data.txt Code: p (A) {1} 0.711786 p (C) {1} 0.061397 p (G) {1} 0.145917 p (T) {1} 0.080901 p (A) {2} 0.711786 p (C) {2} 0.061397 p (G) {2} 0.145917 p (T) {2} 0.080901 p (A) {3} 0.234369 p (C) {3} 0.055205 p (G) {3} 0.645478 p (T) {3} 0.064948 I n (HowTos)