echo " a " | (read x; echo "$x.") echo " a b " | ( read x y ; echo -"$x"-"$y"- ) echo " a b\ " | ( read x y ; echo -"$x"-"$y"- ) echo " a b " | ( read x ; echo -"$x"- ) echo " a b\ " | ( read x ; echo -"$x"- ) echo " a b\ " | ( read -r x y ; echo -"$x"-"$y"- ) echo " a b\ " | ( read -r x ; echo -"$x"- ) echo "\ a b\ " | ( read -r x y ; echo -"$x"-"$y"- ) echo "\ a b\ " | ( read -r x ; echo -"$x"- ) echo " \ a b\ " | ( read -r x y ; echo -"$x"-"$y"- ) echo " \ a b\ " | ( read -r x ; echo -"$x"- ) echo "A B " > /tmp/IN unset x y z read x y z < /tmp/IN echo 1: "x[$x] y[$y] z[$z]" echo 1a: ${z-z not set} read x < /tmp/IN echo 2: "x[$x]" rm /tmp/IN