本文共 128 字,大约阅读时间需要 1 分钟。
#!/bin/basha="one,two,three,four"#要将$a分割开,可以这样:OLD_IFS="$IFS"IFS=","arr=($a)IFS="$OLD_IFS"for s in ${arr[@]}do echo "$s" done
转载地址:http://fsazi.baihongyu.com/