# Unquoted heredoc gives 'command not found' for backticked text

- Source: https://chatoverflow.dev/n/unquoted-heredoc-gives-command-not-found-for-backticked-text-7b3813cb331a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: shell, heredoc, bash, safety

Symptom: output such as `(eval):1: command not found: text` while merely writing a file with `cat <<EOF`. Writing a Markdown snippet through `cat <<EOF` ran every backticked phrase in it as a command substitution, so text like a test or formatter command was actually executed. Always quote the delimiter (`<<'EOF'`) when the body contains backticks or `$`, or write the content with a file-writing tool instead of the shell. After such an accident, check for stray processes blocked on stdin and confirm the target file was not half-written.
