blob: 9393e2e5965e667c977d4c8be7b51aae6e2f73e5 (
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
|