Last active
March 2, 2016 01:03
-
-
Save dilijev/5b176d07cda472bb1ab8 to your computer and use it in GitHub Desktop.
Bash one-liner to find all filetypes in a git repo
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
git ls-files | grep -P '\/[^\/\.]*\.[^\/\.]+$' | sed -r 's/.*\.([^\/\.]+)$/\1/g' | sort | uniq |
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
#!/usr/bin/sh | |
# add this file on the path so that you can run the following command: | |
# git filetypes | |
git ls-files | grep -P '\/[^\/\.]*\.[^\/\.]+$' | sed -r 's/.*\.([^\/\.]+)$/\1/g' | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment