Pattern: Redundant (..)
around test command
Issue: -
You are wrapping a single test command in (..)
, creating an unnecessary subshell. Delete the surrounding (..)
since they serve no purpose and only slows the script down.
Example of incorrect code:
([ "$x" -gt 0 ]) && foo
Example of correct code:
[ "$x" -gt 0 ] && foo