I have an array of floats in Bash:
For example:
array(1.0002, 1.00232, 1.3222, ....)
I want to find the maximum and the minimum element of the array using Bash. The problem with this is that I have float elements that are not quite supported in Bash.
I have tried for example:
IFS=$'\n'
echo "${ar[*]}" | sort -nr | head -n1
But it does not work for floats.
What is the best way to do this?