summaryrefslogtreecommitdiffhomepage
path: root/shell/hush_test/hush-read/read_ifs2.tests
blob: f01a68978f2fac8d08be6b9e3834a31a5e729926 (plain)
1
2
3
4
5
6
7
8
9
echo "X:Y:Z:" | (IFS=": " read x y; echo "|$x|$y|")
echo "X:Y:Z"  | (IFS=": " read x y; echo "|$x|$y|")
echo "X:Y:"   | (IFS=": " read x y; echo "|$x|$y|")
echo "X:Y"    | (IFS=": " read x y; echo "|$x|$y|")
echo "X:"     | (IFS=": " read x y; echo "|$x|$y|")
echo "X"      | (IFS=": " read x y; echo "|$x|$y|")
echo ""       | (IFS=": " read x y; echo "|$x|$y|")
echo Whitespace should be trimmed too:
echo "X:Y  : " | (IFS=": " read x y; echo "|$x|$y|")