SC3037: echo flags
Author: demurkyCreated Sep 6, 2021Updated Sep 28, 2026
For bugs
- Rule Id (if any, e.g. SC1000): SC3037
- My shellcheck version (
shellcheck --versionor "online"): 0.7.2 - The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
#!/bin/sh
/bin/echo -e text
Here's what shellcheck currently says:
/bin/echo -e text
^-- SC3037: In POSIX sh, echo flags are undefined.Here's what I wanted or expected to see:
/bin/echo, /usr/bin/echo, ... are binaries and are not builtin shell commands and are separate from the shell.
shellcheck shouldn't warn about undefined flags for these binaries.
Source: koalaman/shellcheck