Write to or create a file

# The quotes around `EOF` ensure that everything inside it isn't interpreted (for e.g., `$`).
cat > filename.sh << 'EOF'
...
EOF