Multiline input

2 snippets across 2 stacks - Bash & Linux, HTML & CSS

SHBash & Linux

Here Document

SH · Redirects & Pipes
Syntax
command <<DELIMITER
text
DELIMITER
Example
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
EOF

Note 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.

HCHTML & CSS

Textarea

HC · Forms
Syntax
<textarea name="field" rows="n" cols="n"></textarea>
Example
<label for="message">Your Message:</label>
<textarea id="message" name="message" rows="5" cols="40" placeholder="Type your message here..." maxlength="500"></textarea>

Note Unlike input, the textarea value goes between the opening and closing tags, not in a value attribute. Use the CSS resize property to control whether users can resize it.

Frequently asked questions

How does Bash & Linux handle multiline input?
This task is covered in 2 stacks on this page: Bash & Linux, HTML & CSS. The "Here Document" snippet in Bash & Linux uses `command <<DELIMITER`.
Which command does the Bash & Linux example use?
The "Here Document" snippet uses `command <<DELIMITER`, from the Redirects & Pipes section of the Bash & Linux cheat sheet.
Which stacks cover "multiline input" on this page?
Bash & Linux, HTML & CSS. Together they hold 2 copy-ready snippets for this task.
Is there anything to watch out for?
Yes. For "Here Document": 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.