SC1029 – ShellCheck Wiki

See this page on GitHub

Sitemap


In [..](..) you shouldn't escape ( or ).

Problematic code:

[[ -e ~/.bashrc && \( -x /bin/dash || -x /bin/ash \) ]]

Correct code:

[[ -e ~/.bashrc && ( -x /bin/dash || -x /bin/ash ) ]]

Rationale:

You don't have to -- and can't -- escape ( or ) inside a [[ .. ]] expression like you do in [ .. ]. Just remove the escaping.

Exceptions:

None.


ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.