摘要: 代码:test.sh #!/bin/bash a="one,two,three,four" #要将$a分割开,可以这样: OLD_IFS="$IFS" IFS="," arr=($a) IFS="$OLD_IFS" for s in ${arr[@]} do echo "$s" done shell 阅读全文
posted @ 2021-06-09 15:13 冥想心灵 阅读(6130) 评论(0) 推荐(0)