printf 'test\0zest\n' | (read -d '' reply; echo "$reply")