summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-read/read_ifs.tests
blob: cf7cd934c0c9e16554a6ff2296d27e48f8c0106d (plain)
1
2
3
4
5
6
7
printf 'a\t\tb\tc\n' | ( IFS=$(printf "\t") read a b c; echo ".$a. .$b. .$c." )
printf 'a\t\tb\tc\n' | ( IFS=$(printf " \t") read a b c; echo ".$a. .$b. .$c." )
printf 'a,,b,c\n'    | ( IFS="," read a b c; echo ".$a. .$b. .$c." )
printf 'a,,b,c\n'    | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." )
printf 'a ,, c\n'    | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." )
printf 'a ,, c d\n'  | ( IFS=" ," read a b c d; echo ".$a. .$b. .$c. .$d." )
printf ' a,,b,c,d  ,  ,\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." )