📌  相关文章
📜  如何在 shell 脚本中对数组进行排序 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:29.547000             🧑  作者: Mango

代码示例1
# 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)