|
From: | Clark J. Wang |
Subject: | Strange behavior of IFS? |
Date: | Thu, 15 Apr 2010 21:58:42 +0800 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |