diff options
Diffstat (limited to 'find-files.sh')
-rwxr-xr-x | find-files.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/find-files.sh b/find-files.sh new file mode 100755 index 0000000..2094291 --- /dev/null +++ b/find-files.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +while read dir; do + find "$dir" -name '*.debug' -type f -print0 | + xargs -0 file -N -F ' ' -i | + awk ' +NF == 2 && $2 == "application/x-executable" { print $1 >> "exec" ; next } +NF == 2 && $2 == "application/x-sharedlib" { print $1 >> "dyn" ; next } +NF == 2 && $2 == "application/x-object" { print $1 >> "rel" ; next } +NF == 2 && $2 == "application/x-archive" { print $1 >> "archive" ; next } +{ print "unexpected line:", $0; next } +' +done |