The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 02-11-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
finding nearest numbers

Hey guys I would like to know how to find nearest numbers based on second column in 1st column some thing like this

Input
col1 col2
10 20
30 40
48 64
55 71
70 90

output
col1 col2 col3
10 20 30
30 40 48
48 64 70
55 71
70 90