Skip to content

Instantly share code, notes, and snippets.

@arlm
Created December 12, 2023 11:55
Show Gist options
  • Save arlm/3f7d9cb7c67c0a138dfcbf0ab1e81dcb to your computer and use it in GitHub Desktop.
Save arlm/3f7d9cb7c67c0a138dfcbf0ab1e81dcb to your computer and use it in GitHub Desktop.
Shell command to find duplicate lines in a file
find . -name .gitignore -maxdepth 2 -exec sh -c "echo {} && sort {} | tr -s '\n' | uniq -cd" \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment