SC2217 – ShellCheck Wiki

See this page on GitHub


Redirecting to echo, a command that doesn't read stdin. Bad quoting or missing xargs?

Problematic code:

echo << eof
  Hello World

Correct code:

cat << eof
  Hello World


You are redirecting to one of several commands that don't read from stdin.

This may happen when:

Check your logic, and rewrite the command so data is passed correctly.


If you've overridden a command to return output, you can either rename it to make this obvious, or ignore this message.

ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.