ericrasch
6/16/2016 - 4:42 PM

z-index.sh

# How to search the "z-index" values of your CSS project
git grep -h "z-index" | sed -E "s/.*z-index\s*:\s*(-?[0-9]+).*/\1/" | sort | uniq -c | sort -b -r

# Explanations
# git grep -h "z-index"
#  -> Find every line of your project that contain "z-index"
# sed -E "s/.*z-index\s*:\s*(-?[0-9]+).*/\1/"
#  -> Only keep the property value
# sort | uniq -c | sort -b -r
#  -> count the number of occurrences by value