3 # note this works for both a.out and ELF executables
5 PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin
10 filelist=`sed "s/['\"]/\\\&/g"`
11 [ -z "$filelist" ] && exit #emulate -r option for xargs
13 for f in `echo $filelist | xargs file | grep -F executable | cut -d: -f1`; do
14 ldd $f 2>/dev/null | awk '/\=\>/ { print $1 }'
15 done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u