1) look for => instead of ! "statically linked"

2) don't follow symlinks
3) use basename on lib names

CVS patchset: 1182
CVS date: 1996/11/21 22:05:26
This commit is contained in:
ewt 1996-11-21 22:05:26 +00:00
parent ae565589c5
commit 61b3ba144f
1 changed files with 3 additions and 3 deletions

View File

@ -2,8 +2,8 @@
# note this works for both a.out and ELF executables
filelist=$(xargs file -L 2>/dev/null | grep "executable" | cut -d: -f1)
filelist=$(xargs file 2>/dev/null | grep "executable" | cut -d: -f1)
for f in $filelist; do
ldd $f | grep -v 'statically linked' | awk '{ print $1 }'
done | sort -u
ldd $f | grep '=>' | awk '{ print $1 }'
done | sort -u | xargs -r -n 1 basename | sort -u