Just finished in Bash with the 3 achievements. I've never used Bash before. It took me hours of trial and error. If you are struggling with this puzzle in Bash, don't think that there is something wrong with you because this is really tough. Trying to process 100,000 numbers in the time given made me want to hurt my keyboard.
Thanks a lot to the people on this thread, in particular Yaku's tip on not needing to compare the difference between every two elements in a sorted array with the current minimum difference really helped. For some reason creating a second sorted array containing the differences and the answer being the first element in that array worked in Bash. It's a horrible algorithm but it worked.
I tried with an elegant solution that only iterated over the elements once but it never worked quickly enough for me in Bash.
dgo_ponciano thanks for the reminder about "sort -n" for doing a numeric sort.
The most useful web page for me was this: sorting arrays