fixes in syntax.
EOF, "read -d" function and "-e" parameter