scripts/lsext

6 lines
219 B
Plaintext
Raw Normal View History

2020-07-30 13:44:20 +00:00
#!/bin/env sh
2021-03-12 14:56:00 +00:00
# list all extentions in a folder up to a certain depth and sort by frequency
# lsext $folder $depth
2020-07-30 13:44:20 +00:00
find "${1:-.}" -maxdepth ${2:-1} -type f | sed -e 's/.*\.//' | tr [:upper:] [:lower:] | sort | uniq -c