nix/home/program/bash/module/Find.sh

6 lines
186 B
Bash
Raw Normal View History

2024-12-18 10:54:24 +03:00
# Find all file extensions.
function find_ext() {
local types=($(find -type f | sed -e "s/.*\///" -e "s/^\.//" -e "/\./!d" -e "s/.*\.//"))
echo "${types[@]}" | tr ' ' '\n' | sort -u
}