Shell 脚本将字符串转换为数组

Shell 脚本将字符串转换为数组 1. 代码 [root@server4 shells]# cat -n test1.sh 1 #!/bin/bash 2 str="A,B,C,D,E,F,G,H" 3 4 oldIFS=$IFS 5 IFS=, 6 arr=($str) 7 8 # echo ${arr}
相关文章
相关标签/搜索