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}
相關文章
相關標籤/搜索