Skip to content

Instantly share code, notes, and snippets.

@MaffooBristol
Last active March 10, 2020 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaffooBristol/4d52ee2bb818d5a07e71d0ed547dcb40 to your computer and use it in GitHub Desktop.
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
# 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