Skip to content

Instantly share code, notes, and snippets.

@maxice8
Created January 26, 2023 19:14
Show Gist options
  • Save maxice8/e404fca9b02b6331ed9c9dbeef07b16d to your computer and use it in GitHub Desktop.
Save maxice8/e404fca9b02b6331ed9c9dbeef07b16d to your computer and use it in GitHub Desktop.
find directories recursively holding icons
#!/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