awk - take the entire row from whith the smallest value from column 1 -


i have file

2  1 12 2 34 1 56 1 45 3 33 2 77 1 83 2 62 3 75 3 

i want take entire row whith smallest value column 1 this

2  1 12 2 45 3 

here start with

{ if (!vals[$2] || vals[$2] > $1) vals[$2] = $1 } end { (idx in vals) print vals[idx] " " idx } 

you should add robustness code.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -