Shell 编程--数组冒泡排序

[root@localhost ~]# vim maopao.sh #!/bin/bash array=(3 6 7 4 2) for ((i=1; i<${#array[*]}; i++)) do for ((j=0; j<${#array[*]}-i; j++)) do if [ ${array[$j]} -lt ${array[$[$j+1]]} ];then
相关文章
相关标签/搜索