View Single Post
Join Date: Dec 2007
Posts: 11
Reputation: ahjiefreak is an unknown quantity at this point 
Solved Threads: 1
ahjiefreak ahjiefreak is offline Offline
Newbie Poster

Urgent: Help on grep the nearest value using bash script

 
0
  #1
Apr 2nd, 2008
Hi,

I have a list of data in text files with :-
ColA ColB ColC ColD ColE ColF
12 122 2280 30 0.012987 1.776
13 118 2280 30 0.012987 1.954
14 115 2620 30 0.011321 2.131
15 113 2654 30 0.011177 2.309
16 145 1882 25 0.013110 2.487
17 112 2817 30 0.010537 2.664
18 126 2833 30 0.010479 2.842
19 111 2833 30 0.010479 3.020
16 145 1882 25 0.013110 2.487
17 112 2817 30 0.010537 2.664

How could I grep the nearest number to <=3.000 using bash script?

Means in the end i would like to isolate numbers in ColF which last seen the value <= 3.000 which is

18 126 2833 30 0.010479 2.842


Please help. Thanks.
Last edited by ahjiefreak; Apr 2nd, 2008 at 1:48 am. Reason: Confusion of the question
Reply With Quote