gerg

cat << EOHEREDOC > /tmp/yourfilehere
These contents will be written to the file.
        This line is indented.
EOHEREDOC

ergreg