-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC1044
John Gardner edited this page Dec 22, 2021
·
5 revisions
cat << EOF
Hello World
cat << EOF
Hello World
EOF
The <<
here document (aka heredoc) was not properly terminated. The terminating token needs to be on a separate line without indenting (or indented with tabs only when using <<-
).
Note that you can not put here documents in one liners. For such use cases, use a <<<
here string:
cat << EOF hello world EOF # Wrong: data and terminator can not be on the same line
cat <<< "hello world" # Correct
None
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!