File creation with cat and EOF

(for scripting purposes)

cat <<EOF > /path/to/file.txt
dfsdfsdf
sdfsdfsdf
sdfsdfsdfewe
svvse
EOF

echo 'fdfdfdfdfdf' > path/to/file