I have these if conditions, but it has compile errors. How can I fix it?
if [ $DEVICE_ID == "" ]; then
I get error:
line 63: [: ==: unary operator expected
if [ 'ls -l Mytest*.log | wc -l' -eq 1 ]; then
i get error:
line 68: [: ls -l Kernel*.log | wc -l: integer expression expected
Quote the variable:
But it would be better to do:
The second error is that you need to use backquotes: