1. dash的写法: 使用awk string="abc,def,h" for var in $(echo ${ string} | awk '{split($0,arr,",");for(i in arr) print arr[i]}') do echo ${ var} done 2. bash可以这样写: string="abc,def,h"<