blob: 05e40247c1c24303c1418a45d352f354b2b1b8e0 (
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 | grep -F 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
|