blob: d0f7f8928e91ad52d58427a0e1df61729fb8c2ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/sh
# note this works for both a.out and ELF executables
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin
export PATH
ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
[ -z "$filelist" ] && exit #emulate -r option for xargs
for f in `echo $filelist | xargs file | fgrep executable | cut -d: -f1`; do
ldd $f 2>/dev/null | awk '/\=\>/ { print $1 }'
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
|