1996-11-26 00:02:48 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# note this works for both a.out and ELF executables
|
|
|
|
|
1998-11-07 03:55:55 +08:00
|
|
|
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin
|
|
|
|
export PATH
|
|
|
|
|
1996-11-26 00:02:48 +08:00
|
|
|
ulimit -c 0
|
|
|
|
|
1998-04-09 10:41:13 +08:00
|
|
|
filelist=`sed "s/['\"]/\\\&/g"`
|
1999-10-11 23:47:27 +08:00
|
|
|
[ -z "$filelist" ] && exit #emulate -r option for xargs
|
1996-11-26 00:02:48 +08:00
|
|
|
|
1998-04-09 10:41:13 +08:00
|
|
|
for f in `echo $filelist | xargs file | fgrep executable | cut -d: -f1`; do
|
1997-07-24 02:38:51 +08:00
|
|
|
ldd $f 2>/dev/null | awk '/\=\>/ { print $1 }'
|
1998-04-09 10:41:13 +08:00
|
|
|
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
|
1996-11-26 00:02:48 +08:00
|
|
|
|