scripts/lsext

6 lines
219 B
Bash
Executable File

#!/bin/env sh
# list all extentions in a folder up to a certain depth and sort by frequency
# lsext $folder $depth
find "${1:-.}" -maxdepth ${2:-1} -type f | sed -e 's/.*\.//' | tr [:upper:] [:lower:] | sort | uniq -c