BASH creating a file as part of a script
cat > newfile.txt <<'EOF'contents of the new text file goes in hereit can span multiple linesEOFThe above will create newfile.txt with 2 lines of content. If you quote the EOF, you can include special characters
as part of the contents, otherwise you may end up with the error:
: bad substitution