Hy again guys,
Last week i resolve a question here but now i need your help again :rolleyes:
I have about 3000 files that i need to choose based on the lowest value, so i make temp files like this:
The files can have lines from 1-10 but only 2 columns, the point is to grep the name os the file in 1st column based in lowest value of 2nd collumn
For select the line with lowest value i use in a bash script this line:
nomepose=(`awk '{if ($2 < min) {min=$2; minline=$0}} END {print minline}' $awkvar | awk '{print $1}'`)
As a awk variable to get me the name of file. But after i execute the script i found that some files have positive values like this:
ZINC03391611_0 0.18602
ZINC03391611_1 3.41902
So when i try that line the script cant copy the name of file with lowest value in this case should had print "ZINC03391611_0" but don't print nothing.
I try some variations in this awk but without sucess.
So how can i make the awk to get me always the lowest value even if the value is positive?! ![]()
Thanks
