For simple calculations on floating point numbers (+-*/ and comparisons), you can use awk.
min=$(echo 12.45 10.35 | awk '{if ($1 < $2) print $1; else print $2}') Or, if you have ksh93 or zsh (not bash), you can use your shell's built-in arithmetic, which supports floating point numbers.
if ((min>val)); then ((val=min)); fi For more advanced floating point calculations, look up bc. It actually works on arbitrary-precision fixpoint numbers.