foo="compact,nostripe,contig";foo=${foo//,/\ }; for i in $foo; do echo $i; done