Skip to content
koalaman edited this page Jun 3, 2017 · 2 revisions

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

Problematic code:

[[ -e ~/.bashrc -a \( -x /bin/dash -o -x /bin/ash \) ]]

Correct code:

[[ -e ~/.bashrc -a ( -x /bin/dash -o -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

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally