diff --git a/SC2143.md b/SC2143.md index 9e9df2c..1fdcb7d 100644 --- a/SC2143.md +++ b/SC2143.md @@ -1,4 +1,4 @@ -## Instead of [ -n $(foo | grep bar) ], use foo | grep -q bar . +## Use grep -q instead of comparing output with [ -n .. ]. ### Problematic code: if [ "$(find . | grep 'IMG[0-9]')" ]