3 SC1111
Joachim Ansorg edited this page 2024-07-05 10:57:07 +02:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This is a Unicode quote. Delete and retype it (or ignore/singlequote for literal).

Problematic code:

echo "hello world”

Correct code:

echo "hello world"

Rationale:

Some software, like OS X, Word and WordPress, may automatically replace your regular quotes with slanted Unicode quotes. The shell does not recognize these quotes and will not respect them.

In this case, you have slanted double quotes in a double quoted string. Try deleting and retyping them, and/or disable “smart quotes” in your editor or OS.

Exceptions

If you want to use literal slanted double quotes for typographic reasons, you can put them in single quotes to make ShellCheck ignore them:

printf 'Warning: “wakeonlan” is not installed.\n'

Alternatively, use single slanted Unicode quotes like so:

printf "Warning: wakeonlan is not installed.\n"

You can also just ignore this warning.