echo is fine when its argument is not a variable.
echo "banned command $cmd: $output"
This is non-portable if there is any possibility that these variables contain backslashes. dash$ x="foo\nasd"
dash$ echo "$x"
foo
asd
dash$ printf "%s\n" "$x"
foo\nasd
dash$
zsh% x="foo\nasd"
zsh% echo "$x"
foo
asd
zsh% printf "%s\n" "$x"
foo\nasd
zsh%
bash$ x="foo\nasd"
bash$ echo "$x"
foo\nasd
bash$ printf "%s\n" "$x"
foo\nasd
bash$ bash$ echo -e $x
foo
asd
bash$From POSIX:
>echo - write arguments to standard output
>If the first operand is -n, or if any of the operands contain a <backslash> character, the results are implementation-defined.
In other words, they control where this script runs and there is no need to run it on more than one platform, so it's okay for it to be non-portable.