Conditional operator [[ ]] tests files and strings. To test error codes returned from command, use if statement directly without any operators.