Expected this to be an argument to the unary condition
13echo “hello world”
14
15# SH-1019
16[ -x ]
Description
Found a unary test operator that does not appear to be followed by a valid shell word.
This could be because of a misplaced ]
, )
, or a missing space before the ]
.
It is recommended to check the syntax and make sure the test operator has an operand.
Problematic code:
[ -x ]
Correct code:
[ -x "myfile" ]