Created
January 26, 2023 19:14
-
-
Save maxice8/e404fca9b02b6331ed9c9dbeef07b16d to your computer and use it in GitHub Desktop.
find directories recursively holding icons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
if not set -q argv[1] | |
echo "point to a directory" >&2 | |
exit 1 | |
end | |
for file in $argv[1]/** | |
[ -d $file ] || continue | |
for f in $file/* | |
test -f $f; and string match -q "*.dds" $f | |
end || continue | |
echo $file | |
end | sort -u | sed -r 's|(.*)|icon[\1]|g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment