3 SC1027
Vidar Holen edited this page 2022-10-19 20:12:26 -07:00

Expected another argument for this operator.

Problematic code:

[ $a -ne ]

Correct code:

[ $a -ne $b ]

Rationale:

ShellCheck found a test operator without an operand. This could be a copy-paste fail, bad linebreak, or trying to use <> instead of != or -ne.

Exceptions:

None.

  • Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!