Last active
March 10, 2020 09:49
-
-
Save MaffooBristol/4d52ee2bb818d5a07e71d0ed547dcb40 to your computer and use it in GitHub Desktop.
Find all files named StyledFoo.js and then find how many times they're referenced in React files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find all files named StyledFoo.js and then find how many times they're referenced in React files | |
for i in $(find . -name "Styled*.js"); do j=$(basename $i | cut -d. -f1); k=$(grep -IiRn "<$j" src/ | wc -l); echo "$k $i"; done | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment