diff --git a/tools/find-unused-css b/tools/find-unused-css index 86c5b771f7..d474922c03 100755 --- a/tools/find-unused-css +++ b/tools/find-unused-css @@ -2,7 +2,7 @@ # Hackish tool for attempting to find unused IDs / classes in our CSS for n in $(perl -lne 'print $1 while /[#.]([a-zA-Z0-9_-]+)/g' static/styles/zulip.css | sort -u); do - if [ $(git grep "$n" | grep -v '^static/styles/zulip.css' | wc -l) -eq 0 ]; then - echo $n + if [ "$(git grep "$n" | grep -cv '^static/styles/zulip.css')" -eq 0 ]; then + echo "$n" fi done