Here Document
SH · Redirects & Pipessyntax
command <<DELIMITER
text
DELIMITERexample
cat <<EOF > /etc/nginx/conf.d/app.conf
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://localhost:3000;
}
}
EOF
# Suppress variable expansion:
cat <<'EOF'
Use $HOME to reference your home directory
EOFNote Variables and commands are expanded inside a here document by default. Quoting the delimiter ('EOF') disables expansion, which is useful when writing scripts or config files that contain $ characters. <<- strips leading tabs (not spaces) for cleaner indentation.