Look at following result: # cat foo.sh string=aa:bb:cc oldIFS=$IFS IFS=: for i in "$string"; do echo $i done IFS=$oldIFS # bash foo.sh aa bb cc #
I don't understand why the $string was still splitted into words since it's double quoted. Anyone can give a reasonable explanation? -Clark