The above script does not seem to be working for me when used in the following way -
for year in "${file}"/{1950..2015}01.pnt
do
cat "$year"
done |
awk '{n=$3; $3=x} !($0 in A) || n<A[$0] {A[$0]=n} END{for(i in A) print i A}' > output.txt
I need it to search through all the January's in years 1950-2015 and grep out the minimum value in Column 3 of each unique value contained in Columns 1 and 2.
I don't see any reason why Scrutinizer's script should not work on your scenario unless the structure of the files in your directories differs from the one posted as samples in post#1.