#!/bin/bash
string="hello,shell,split,test" 
#将,替换为空格 
array=(${string//,/ })  
 
for var in ${array[@]}
do
   echo $var
done