Paste any string → copy a single-quoted literal safe for Bash, using '\'' for embedded apostrophes.
This mirrors how you manually wrap segments in Bash. It is not identical to Bash printf %q for every exotic byte (see ANSI-C quoting below).
Input contains newline(s). Single quotes cannot span raw newlines inside one quoted token — wrap with $'…' or use heredocs for multiline payloads.
ANSI-C: for odd control bytes, Bash allows $'line\n'; zsh/fish differ — not covered in this v1 page.
Snippet normalizes pasted CRLF to LF. Ensure the pasted body cannot include a solitary line identical to your delimiter terminator — Bash would end early.