Linux 中 Shell 中的数组(将命令行参数作为数组的元素)

来源:互联网 发布:javlibrary新域名14 编辑:程序博客网 时间:2024/05/23 12:47
#!/bin/shnum=$#one=1zero=0array=($@)              #将命令行参数作为数组元素while [ ${num} != ${zero} ] dolet "num-=one"echo "${array[num]}"done

原创粉丝点击