Last active
August 29, 2015 14:05
-
-
Save wteuber/7ff3b84e8f854d617d77 to your computer and use it in GitHub Desktop.
list file extensions
This file contains 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
# plain | |
find . -name '*.*' | sed 's/.*\.//' | sort -u | tr "\n" " " | |
# git | |
git ls-files "*.*" | sed 's/.*\.//' | sort -u | tr "\n" " " | |
# Explained | |
# find . -name '*.*' # List all files containing a '.' | |
# git ls-files "*.*" # List all tracked files containing a '.' | |
# | |
# sed 's/.*\.//' # Remove everything from string until the last '.' | |
# | |
# sort -u # Sort unique(!) output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment