Denis Vlasenko | 46aeab9 | 2009-03-31 19:18:17 +0000 | [diff] [blame] | 1 | printf 'a\t\tb\tc\n' | ( IFS=$(printf "\t") read a b c; echo ".$a. .$b. .$c." ) |
| 2 | printf 'a\t\tb\tc\n' | ( IFS=$(printf " \t") read a b c; echo ".$a. .$b. .$c." ) |
| 3 | printf 'a,,b,c\n' | ( IFS="," read a b c; echo ".$a. .$b. .$c." ) |
| 4 | printf 'a,,b,c\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." ) |
| 5 | printf 'a ,, c\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." ) |
| 6 | printf 'a ,, c d\n' | ( IFS=" ," read a b c d; echo ".$a. .$b. .$c. .$d." ) |
| 7 | printf ' a,,b,c,d , ,\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." ) |