nix/home/program/bash/module/Find.nix
2024-11-06 01:07:30 +03:00

10 lines
227 B
Nix

{ ... }: {
text = ''
# 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
}
'';
}