Como classificar a matriz no script de shell

# sorts array arr and stores it in array arrSorted in ascending order
# %d for integers
# %f for floats
readarray -t arrSorted < <(printf '%d\n' "${arr[@]}" | sort)
Feaster