I have a line ifin my shell script that looks like this:
if [ 0 -lt 2 -o (0 -gt 3 ) ]
and this gives an error:
line 3: syntax error near unexpected token `('
So, I looked at man testto make sure that parens were supported and, of course, very close to the top of the man page, they are! What gives!?
The above example does not exactly match the code, because I tried to clear it to prove the point, but this is my repo if you need context.
EDIT: the if line has changed to match the error.
source
share