Finding file extensions with AWK

This one-liner helps in finding the file extensions of a given Subversion working copy:
find path_to_repos -type f | grep -v "/.svn/" | awk -F "/" '{print $NF}' | awk -F "." '{if (NF > 1) {print $NF}}' | sort | uniq

Its usage outside of Subversion is even more trivial.

Last update: 2008-05-20

Post a Comment

Your email is never shared. Required fields are marked *

*
*