diff --git a/SC2039.md b/SC2039.md index e31cea9..3a84eaa 100644 --- a/SC2039.md +++ b/SC2039.md @@ -251,6 +251,21 @@ command > file 2>&1 or command 2>&1 | othercommand No Comments / Exceptions +### Heredoc + +Change: +``` +sed 's/some_replacement//g' <<< "${var}" +``` + +To: +``` +printf '%s' "${var}" | sed 's/some_replacement//g' +``` + +No Comments / Exceptions + + ## Exception Depends on what your expected POSIX shell providers would use. \ No newline at end of file