1996-11-22 05:58:50 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# note this works for both a.out and ELF executables
|
|
|
|
|
1996-11-22 06:05:26 +08:00
|
|
|
filelist=$(xargs file 2>/dev/null | grep "executable" | cut -d: -f1)
|
1996-11-22 05:58:50 +08:00
|
|
|
|
|
|
|
for f in $filelist; do
|
1996-11-22 06:05:26 +08:00
|
|
|
ldd $f | grep '=>' | awk '{ print $1 }'
|
|
|
|
done | sort -u | xargs -r -n 1 basename | sort -u
|