Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created July 17, 2015 13:52
Show Gist options
  • Save kdabir/5afa19c0b80b732d01e4 to your computer and use it in GitHub Desktop.
Save kdabir/5afa19c0b80b732d01e4 to your computer and use it in GitHub Desktop.
Get extention of line on command line
groovy -ne 'println line.split(/\./)[-1]'
find . -type f | groovy -ne 'println line.split(/\./)[-1]' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment