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